-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
executable file
·80 lines (76 loc) · 1.76 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
version: '2.1'
services:
database-service:
env_file: ./api/.env
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
container_name: questoes-database
ports:
- "3306:3306"
expose:
- "3306"
volumes:
- ./database/docker-data/mysql:/var/lib/mysql
- ./database:/docker-entrypoint-initdb.d
networks:
- questoes_network
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 5s
retries: 20
api-service:
container_name: questoes-api
build: ./api
image: php-fpm
working_dir: /application
volumes:
- ./api:/application
environment:
- APP_ENV=local
depends_on:
database-service:
condition: service_healthy
links:
- database-service
restart: on-failure
networks:
- questoes_network
webserver-service:
env_file: ./api/.env
build:
context: ./api
dockerfile: WebserverDockerfile
args:
EXPOSE_PORT: 80
image: nginx
container_name: questoes-webserver
working_dir: /application
volumes:
- ./api:/application
- ./api/docker/webserver/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- "88:80"
depends_on:
- api-service
networks:
- questoes_network
frontend-service:
image: node:10
container_name: questoes-web
user: "node"
working_dir: /home/node/app
volumes:
- ./frontend:/home/node/app
command:
sh -c 'cp .env.example .env && npm i && npm run serve'
ports:
- "8080:8080"
environment:
- NODE_ENV=development
networks:
- questoes_network
networks:
questoes_network:
name: questoes_network
driver: bridge