-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
executable file
·71 lines (66 loc) · 1.58 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
executable file
·71 lines (66 loc) · 1.58 KB
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
version: "3.3"
services:
mysql:
container_name: mysql
image: mysql:5.7
environment:
MYSQL_USER: ${MYSQL_DEV_USER}
MYSQL_PASSWORD: ${MYSQL_DEV_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DEV_DATABASE}
MYSQL_ROOT_PASSWORD: ${MYSQL_DEV_ROOT_PASSWORD}
ports:
- 5401:3306
restart: always
volumes:
- mysql_data:/var/lib/mysql
- ./database/create_db.sql:/docker-entrypoint-initdb.d/create_db.sql
command: mysqld --sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
api:
container_name: api
depends_on:
- mysql
build:
context: ./backend
dockerfile: Dockerfile-dev
environment:
NODE_ENV: development
MYSQL_USER: ${MYSQL_DEV_USER}
MYSQL_PASSWORD: ${MYSQL_DEV_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DEV_DATABASE}
MYSQL_HOST_IP: mysql
PORT: 8080
HOST: 0.0.0.0
expose:
- 8080
volumes:
- ./backend:/app
command: npm run dev
frontend:
container_name: frontend
depends_on:
- api
build:
context: ./frontend
dockerfile: Dockerfile-dev
environment:
NUXT_PORT: 3000
NUXT_HOST: 0.0.0.0
NODE_ENV: development
expose:
- 3000
volumes:
- ./frontend:/app
command: npm run dev
ngnix:
container_name: nginx
image: nginx:latest
depends_on:
- api
- frontend
restart: always
volumes:
- ./nginx/nginx.dev.conf:/etc/nginx/conf.d/default.conf
ports:
- 80:80
volumes:
mysql_data: