-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml.sample
81 lines (72 loc) · 1.95 KB
/
docker-compose.yml.sample
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
version: '3.7'
x-logging:
&default-logging
driver: "json-file"
options:
max-size: "200k"
max-file: "5"
x-postgresql:
&default-postgresql
image: postgres:10
user: "${UID:-1000}:${GID:-1000}"
volumes:
- ./.docker/postgresql:/var/lib/postgresql/data
- ./docker/postgresql/initdb.d:/docker-entrypoint-initdb.d/:ro # exécuté automatiquement à la création de la base
- ./project/app/Config/sql/:/data:ro # pour pouvoir exécuter manuellement les scripts applicatifs
- /etc/passwd:/etc/passwd:ro
logging: *default-logging
x-postgresql-env:
&default-postgresql-env
POSTGRES_DB: webrsa
POSTGRES_USER: webrsa
POSTGRES_PASSWORD: webrsa
services:
php:
build:
context: ./docker/php
args:
- "VERSION=7.2-1.10"
working_dir: /srv
volumes:
- .:/srv
- ./.env.local:/.env:ro
logging: *default-logging
webrsa.docker.localhost:
build:
context: ./docker/apache
args:
- "VERSION=2.4"
- 'PHP_FPM_HOST=php'
- "APACHE_PORT=8020"
- 'CONF_FILE=appli_webrsa.conf'
dockerfile: Dockerfile
depends_on:
- php
volumes:
- .:/srv/:ro
- ~/.composer/:/home/.composer
ports:
- '8020:8020'
logging: *default-logging
postgresql:
<<: *default-postgresql
environment:
<<: *default-postgresql-env
PGDATA: /var/lib/postgresql/data/pgdata # custom PGDATA
ports:
- "5432:5432" # port mapping
# Rajouter autant de services postgresql (avec des noms différents) que nécessaire
# Il faut penser à modifier : le nom du service, PGDATA et le port
# postgresql_XXXXXX:
# <<: *default-postgresql
# environment:
# <<: *default-postgresql-env
# PGDATA: /var/lib/postgresql/data/pgdata_XXXXXX # custom PGDATA
# ports:
# - "5433:5432" # port mapping
mailhog:
image: mailhog/mailhog
ports:
- '1025:1025'
- '8025:8025'
logging: *default-logging