-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
142 lines (137 loc) · 4.75 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
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
136
137
138
139
140
141
142
version: '2.1'
services:
stagetrek-core:
image: stagetrek-core
container_name: stagetrek-core
build:
context: .
dockerfile: ./deploy_configuration/docker/DockerfileCore
args:
PHP_VERSION: 8.2
HTTP_PROXY: ${PROXY_URL}
APPLICATION_ENV: ${APPLICATION_ENV:-test}
env_file: .env
volumes:
- ./stagetrek:/var/www/html/stagetrek
- ./stagetrek/vendor:/var/www/html/stagetrek/vendor
- ./.env:/var/www/html/stagetrek/.env
- ./deploy_configuration/php/error_reporting.ini:/usr/local/etc/php/conf.d/error_reporting.ini
- ./deploy_configuration/php/90-dev.ini:/usr/local/etc/php/php.ini
- ./deploy_configuration/php/php-fpm.conf:/usr/local/etc/php-fpm.conf
- ./deploy_configuration/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
- ./stagetrek/data:/var/www/html/stagetrek/data
- ./bin/logs:/var/log/stagetrek
# TimeZone pour l'image basé sur celle du host
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
- stagetrek-network
user: root
ports:
- 9000:9000
extra_hosts:
- "host.docker.internal:host-gateway"
working_dir: /var/www/html/stagetrek
entrypoint: ["/run/docker-entrypoint-init.d/entrypoint.sh"]
# entrypoint: ["/bin/sh", "-c"]
# command:
# - |
# composer install &&
# php-fpm
# Conf apache
stagetrek-service:
container_name: stagetrek-service
build:
context: .
dockerfile: ./deploy_configuration/docker/DockerfileApacheService
args:
HTTP_PROXY: ${PROXY_URL}
working_dir: /var/www/html/stagetrek/public
# Note : pour ativer shibb : décomenté l'entry point si dessous et commanté l'autre (+ la cmd)
# entrypoint: ["/run/docker-entrypoint-init.d/shib_entry.sh"]
entrypoint: ["/bin/bash", "-c"]
command:
- |
a2dismod shib &&
a2disconf shib
apachectl configtest &&
/usr/bin/supervisord -n -c /supervisord.conf
environment:
STAGETREK_INSTANCE_URL: ${STAGETREK_INSTANCE_URL:-localhost}
STAGETREK_CORE_POD_NAME: stagetrek-core
APPLICATION_ENV: ${APPLICATION_ENV:-test}
APACHE_LOG_DIR: '/var/log/apache2'
networks:
- stagetrek-network
volumes:
- ./data/cache-apache/:/var/www/html/stagetrek/cache
- ./stagetrek:/var/www/html/stagetrek
- ./deploy_configuration/apache/supervisor-localhost.conf:/supervisord.conf
- ./deploy_configuration/apache/stagetrek-localhost.conf:/etc/apache2/sites-available/000-default.conf
- ./deploy_configuration/apache/stagetrek-ssl.conf:/etc/apache2/sites-available/default-ssl.conf
# TimeZone pour l'image basé sur celle du host
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- 8080:80
- 8443:443
stagetrek-db:
container_name: stagetrek-db
build:
context: .
dockerfile: ./deploy_configuration/docker/DockerfileDatabase
args:
HTTP_PROXY: ${PROXY_URL}
restart: always
environment:
#On ne fournis ici que les données utiles à la BDD et non toutes celle présente dans .env
POSTGRES_USER: ${DATABASE_USER:-admin}
POSTGRES_PASSWORD: ${DATABASE_PSWD:-admin}
POSTGRES_DB: ${DATABASE_NAME:-demo}
PGDATA: /stagetrek-db
networks:
- stagetrek-network
ports:
- 8432:5432
volumes:
- ./data/stagetrek-db:/stagetrek-db:rw
- ./deploy_configuration/db/:/scripts_to_init/
- ./deploy_configuration/db/autoload.sh:/docker-entrypoint-initdb.d/autoload.sh
# TimeZone pour l'image basé sur celle du host
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
stagetrek-timemachine:
build:
context: .
dockerfile: ./deploy_configuration/docker/DockerfileDatabaseTimeMachine
args:
HTTP_PROXY: ${PROXY_URL}
container_name: stagetrek-timemachine
networks:
- stagetrek-network
env_file: .env
environment:
# variables de la bdd
DATABASE_USER: ${DATABASE_USER:-admin}
DATABASE_PSWD: ${DATABASE_PSWD:-admin}
DATABASE_HOST: ${DATABASE_HOST:-stagetrek-db}
DATABASE_PORT: ${DATABASE_PORT:-8432}
DATABASE_NAME: ${DATABASE_NAME:-demo}
# variables du stockage S3
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-admin}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-admin}
BUCKET_INSTANCE_NAME: ${BUCKET_INSTANCE_NAME:-admin}
ENDPOINT_URL: ${ENDPOINT_URL:-admin}
volumes:
# TimeZone pour l'image basé sur celle du host
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
stagetrek-network:
driver: bridge
volumes:
stagetrek-db:
deploy_configuration:
cache-apache:
stagetrek:
data: