-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
56 lines (52 loc) · 1.13 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
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: crowdfunding-frontend-service
environment:
- BASE_URL=http://backend:8080
ports:
- "3000:3000"
depends_on:
- backend
networks:
- crowdfundingapp-network
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: crowdfunding-backend-service
environment:
- DB_HOST=db
- DB_PORT=3306
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=bwastartup
ports:
- "8080:8080"
env_file:
- .env
depends_on:
- db
networks:
- crowdfundingapp-network
db:
image: mysql:8.0
container_name: crowdfunding-db-service
environment:
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
- MYSQL_USER=${DB_USER}
- MYSQL_DATABASE=bwastartup
ports:
- "3306:3306"
volumes:
- db-data:/var/lib/mysql
- ${PWD}/db/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- crowdfundingapp-network
volumes:
db-data:
networks:
crowdfundingapp-network:
driver: bridge