forked from itk-dev/serviceplatformen_organisation_api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
96 lines (89 loc) · 2.79 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# itk-version: 3.1.0
version: "3"
networks:
frontend:
external: true
app:
driver: bridge
internal: false
services:
mariadb:
image: itkdev/mariadb:latest
networks:
- app
ports:
- '3306'
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_USER=db
- MYSQL_PASSWORD=db
- MYSQL_DATABASE=db
#- ENCRYPT=1 # Uncomment to enable database encryption.
phpfpm:
image: itkdev/php8.2-fpm:latest
networks:
- app
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- PHP_XDEBUG_MODE=${PHP_XDEBUG_MODE:-off}
- PHP_MAX_EXECUTION_TIME=30
- PHP_MEMORY_LIMIT=512M
# Depending on the setup you may have to remove --read-envelope-from from msmtp (cf. https://marlam.de/msmtp/msmtp.html) or use SMTP to send mail
- PHP_SENDMAIL_PATH=/usr/bin/msmtp --host=mail --port=1025 --read-recipients --read-envelope-from
- DOCKER_HOST_DOMAIN=${COMPOSE_DOMAIN}
- COMPOSER_VERSION=2
- PHP_IDE_CONFIG=serverName=localhost
depends_on:
- mariadb
volumes:
- .:/app
nginx:
image: nginxinc/nginx-unprivileged:alpine
networks:
- app
- frontend
depends_on:
- phpfpm
ports:
- '8080'
volumes:
- ./.docker/vhost.conf:/etc/nginx/conf.d/default.conf:ro
- .:/app
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_DOMAIN}`)"
# HTTPS config - uncomment to enable redirect from :80 to :443
# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https"
# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
mail:
image: axllent/mailpit
networks:
- app
- frontend
ports:
- "1025"
- "8025"
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}mail.rule=Host(`mail-${COMPOSE_DOMAIN}`)"
- "traefik.http.services.${COMPOSE_PROJECT_NAME}mail.loadbalancer.server.port=8025"
###> doctrine/doctrine-bundle ###
database:
image: postgres:${POSTGRES_VERSION:-15}-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-app}
# You should definitely change the password in production
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}
POSTGRES_USER: ${POSTGRES_USER:-app}
volumes:
- database_data:/var/lib/postgresql/data:rw
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/db/data:/var/lib/postgresql/data:rw
###< doctrine/doctrine-bundle ###
volumes:
###> doctrine/doctrine-bundle ###
database_data:
###< doctrine/doctrine-bundle ###