-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
110 lines (106 loc) · 3.14 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
version: '2'
networks:
sc_backend:
driver: bridge
services:
### Applications Code Container #############################
applications:
image: tianon/true
volumes:
- ./src/:/usr/src/app
- ./tmp/mysql-data:/var/lib/mysql
- ./tmp/logs:/var/log/nginx
- ./config/htpasswd/.htpasswd:/etc/nginx/.htpasswd
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./config/${ENVIRONMENT}.conf:/etc/nginx/conf.d/site.conf
- ./tmp/logs/cron.log:/var/log/cron.log
- ${SSL_CERT_PATH}:/etc/ssl/certs/crt.pem
- ${SSL_CERT_KEY_PATH}:/etc/ssl/private/key.pem
container_name: ad4-app
networks:
- sc_backend
### nginx container ###############
nginx:
build: ./dockers/nginx/
ports:
- 80:80
- 443:443
expose:
- 80
- 443
links:
- adonisjs-admin
- nuxtjs-frontend
- wordpress
volumes_from:
- applications
extra_hosts:
- "dockerhost:127.0.0.1"
container_name: ad4-nginx
networks:
- sc_backend
### adonisjs admin Container ###########################
adonisjs-admin:
build:
context: ./src/admin
volumes_from:
- applications
ports:
- 8080:8080
# tty: true
container_name: ad4-adonisjs-admin
command: ["sh", "-c", "npm run start"]
networks:
- sc_backend
### NuxtJS frontend Container #############################
nuxtjs-frontend:
build:
context: ./src/frontend
volumes_from:
- applications
ports:
- 3333:3333
links:
- adonisjs-admin
container_name: ad4-nuxtjs-frontend
command: ["sh", "-c", "./wait-for-it.sh adonisjs-admin:8080 -- sleep 5; npm run build && npm run start"]
# command: ["sh", "-c", "npm run build && npm run start"]
networks:
- sc_backend
### WordPress Container ###################################
wordpress:
build: ./dockers/php/
expose:
- 80
- 443
volumes_from:
- applications
extra_hosts:
- "dockerhost:127.0.0.1"
container_name: ad4-wordpress
working_dir: /usr/src/app/wordpress
networks:
- sc_backend
### WPCLI ##################################################
wpcli:
build: ./dockers/wpcli/
volumes_from:
- applications
working_dir: /usr/src/app/wordpress
entrypoint: wp
command: "--info"
networks:
- sc_backend
### REDIS CONTAINER #########################################
redis:
image: redis:4.0.5-alpine
command: ["redis-server", "--appendonly", "yes", "--requirepass", "sc123"]
hostname: redis
networks:
- sc_backend
volumes:
- ./redis-data:/data
### Volumes Setup ###########################################
volumes:
redis:
driver: "local"