-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
83 lines (77 loc) · 1.88 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
version: '3.6'
services:
# NodeJS
frontoffice:
container_name: tests-projet-crm-frontoffice
image: 'node:latest'
working_dir: /home/node/app
command: # TODO : Ajouter des commandes : Construction du code source
- /bin/sh
- '-c'
- 'npm install --only=dev'
ports:
- '80:8000'
volumes: # TODO : Chemin à revoir : pointer sur les fichiers correspondant au front
- ./:/home/node/app:cached
# PHP
backoffice:
container_name: tests-projet-crm-backoffice
build: docker/php
restart: on-failure
ports:
- '81:80'
depends_on:
- db
networks:
- default
volumes:
- ./:/usr/share/nginx/html:rw
- ./docker/php/php.ini-development:/usr/local/etc/php/php.ini
# MySQL
db:
container_name: tests-projet-crm-database
image: 'mysql:latest'
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
- MYSQL_DATABASE=${DATABASE_NAME}
- MYSQL_USER=${DATABASE_USER}
- MYSQL_PASSWORD=${DATABASE_PASSWORD}
- MYSQL_RANDOM_ROOT_PASSWORD=yes
ports:
- 3306:3306
networks:
- default
# Nginx
web:
container_name: tests-projet-crm-web
build: docker/nginx
ports:
- '8001:80'
networks:
- default
depends_on:
- backoffice
volumes:
- ./:/usr/share/nginx/html:rw
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
# - ./docker/nginx/pools.d/www.conf:/etc/nginx/pools.d/www.conf:ro
# Adminer
adminer:
container_name: tests-projet-crm-adminer
image: 'adminer:latest'
depends_on:
- db
ports:
- '8080:8080'
# Composer
composer:
container_name: tests-projet-crm-composer
image: 'composer:1.8'
command: install
depends_on:
- backoffice
volumes:
- ./:/usr/share/nginx/html:rw
networks:
default: