-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
43 lines (39 loc) · 891 Bytes
/
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
version: '3.8'
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- '3000:80'
depends_on:
- api
api:
build:
context: ./backend
dockerfile: Dockerfile
environment:
MYSQL_HOST: 'mysql'
MYSQL_USER: 'root'
MYSQL_PASSWORD: 'andrei1234'
MYSQL_DATABASE: 'tasks_app'
PORT: '8080'
ACCESS_TOKEN_SECRET: '141b3b32fd17226d819697a3c055bb31f238fbff24644c8d2c2bd8c908e1caa514ac8c3ed47e2b75c151136d15ac14839f1ff6a85efb5820cf8639e348c1dd30'
ports:
- '8080:8080'
depends_on:
- mysql
volumes:
- ./backend:/app
command: npm start
mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: 'andrei1234'
MYSQL_DATABASE: 'tasks_app'
volumes:
- mysql-data:/var/lib/mysql
ports:
- '3306:3306'
volumes:
mysql-data: