forked from dunglas/symfony-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
135 lines (127 loc) · 4.06 KB
/
compose.yaml
File metadata and controls
135 lines (127 loc) · 4.06 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
services:
php:
image: ${IMAGES_PREFIX:-}app-php
restart: unless-stopped
environment:
SERVER_NAME: ${SERVER_NAME:-localhost}, php:80
SYMFONY_VERSION: ${SYMFONY_VERSION:-}
STABILITY: ${STABILITY:-stable}
XDEBUG_MODE: "${XDEBUG_MODE:-debug}"
volumes:
- caddy_data:/data
- caddy_config:/config
- ./app:/app
# Copy env file from docker to symfony application
- ./.env:/app/.env
- ./frankenphp/Caddyfile:/etc/caddy/Caddyfile:ro
- ./frankenphp/conf.d/20-app.dev.ini:/usr/local/etc/php/app.conf.d/20-app.dev.ini:ro
# Database dump are availabled in docker git and restore at first deployement (see frankenphp/docker-entrypoint.sh)
- ./dump:/app/dump
# If you develop on Mac or Windows you can remove the vendor/ directory
# from the bind-mount for better performance by enabling the next line:
- /app/vendor
ports:
# HTTP
- target: 80
published: ${HTTP_PORT:-80}
protocol: tcp
# HTTPS
- target: 443
published: ${HTTPS_PORT:-443}
protocol: tcp
# HTTP/3
- target: 443
published: ${HTTP3_PORT:-443}
protocol: udp
depends_on:
- database
build:
context: .
target: frankenphp_dev
extra_hosts:
# Ensure that host.docker.internal is correctly defined on Linux
- host.docker.internal:host-gateway
tty: true
# Mercure is installed as a Caddy module, prevent the Flex recipe from installing another service
###> symfony/mercure-bundle ###
###< symfony/mercure-bundle ###
###> doctrine/doctrine-bundle ###
database:
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: MARIADB_RANDOM_ROOT_PASSWORD
MYSQL_DATABASE: ${MYSQL_DATABASE:-app}
# You should definitely change the password in production
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-!ChangeMe!}
MYSQL_USER: ${MYSQL_USER:-app}
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 5s
retries: 5
start_period: 60s
volumes:
- database:/var/lib/mysql:rw
# - ./docker/db/data:/var/lib/mysql: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
ports:
- "3307:3306"
###< doctrine/doctrine-bundle ###
## OpenLDAP
openldap:
image: bitnami/openldap:2
environment:
LDAP_ADMIN_USERNAME: ${LDAP_ADMIN_USERNAME:-admin}
LDAP_ADMIN_PASSWORD: ${LDAP_ADMIN_PASSWORD:-adminpassword}
LDAP_ROOT: ${APP_LDAP_BASEDN}
LDAP_ADMIN_DN: ${APP_LDAP_SEARCHDN}
volumes:
# Volumes is backup inside the docker container to simplify deployement
- ./services/openldap:/bitnami/openldap/
ports:
- '1389:1389'
- '1636:1636'
### Dolibarr
database_dolibarr:
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: "!ChangeMe!"
MYSQL_DATABASE: dolibarr
volumes:
- dolibarr_database:/var/lib/mysql
ports:
- "3308:3306"
dolibarr:
image: dolibarr/dolibarr:latest
environment:
DOLI_DB_HOST: ${DOLI_DB_HOST:-database_dolibarr}
DOLI_DB_USER: ${DOLI_DB_USER:-root}
DOLI_DB_PASSWORD: ${DOLI_DB_PASSWORD:-!ChangeMe!}
DOLI_DB_NAME: ${DOLI_DB_NAME:-dolibarr}
DOLI_ADMIN_LOGIN: 'admin'
DOLI_ADMIN_PASSWORD: 'admin'
DOLI_URL_ROOT: 'https://localhost'
PHP_INI_DATE_TIMEZONE: 'Europe/Paris'
volumes:
# Dolibarr document are saved inside the docker git
- ./services/dolibarr/www/custom:/var/www/html/custom
- ./services/dolibarr/www/documents:/var/www/documents
ports:
- '8888:80'
depends_on:
- database_dolibarr
### Mail tester app
mailer:
image: axllent/mailpit
ports:
- "1025"
- "8025"
environment:
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
volumes:
caddy_data:
caddy_config:
# Database are saved as volumes in the docker, so it is persistent but machine dependant
dolibarr_database:
database: