-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
72 lines (68 loc) · 1.8 KB
/
docker-compose.yaml
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
services:
db:
image: mysql:latest
volumes:
- db_data:/var/lib/mysql
restart: always
ports:
- "3307:3306"
env_file: .env
expose:
- "3306"
environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- MYSQL_DATABASE=${DB_NAME}
- MYSQL_USER=django_user
- MYSQL_PASSWORD=${DB_PASSWORD}
networks:
- mynetwork
backend:
build:
context: ./backend
dockerfile: Dockerfile
env_file: .env
volumes:
- ./backend:/home/app/backend
ports:
- "8000:8000"
environment:
- FIREBASE_TYPE=service_account
- FIREBASE_PROJECT_ID=${FIREBASE_PROJECT_ID}
- FIREBASE_PRIVATE_KEY_ID=${FIREBASE_PRIVATE_KEY_ID}
- FIREBASE_PRIVATE_KEY=${FIREBASE_PRIVATE_KEY}
- FIREBASE_CLIENT_EMAIL=${FIREBASE_CLIENT_EMAIL}
- FIREBASE_CLIENT_ID=${FIREBASE_CLIENT_ID}
- FIREBASE_AUTH_URI=${FIREBASE_AUTH_URI}
- FIREBASE_TOKEN_URI=${FIREBASE_TOKEN_URI}
- FIREBASE_AUTH_PROVIDER_X509_CERT_URL=${FIREBASE_AUTH_PROVIDER_X509_CERT_URL}
- FIREBASE_CLIENT_X509_CERT_URL=${FIREBASE_CLIENT_X509_CERT_URL}
- FIREBASE_UNIVERSE_DOMAIN=${FIREBASE_UNIVERSE_DOMAIN}
command: >
sh -c "python manage.py makemigrations &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
restart: "on-failure"
depends_on:
- db
networks:
- mynetwork
frontend:
build:
context: ./frontend/fitness-diet-forum
dockerfile: Dockerfile
env_file: .env
ports:
- "3000:3000"
volumes:
- ./frontend/fitness-diet-forum:/home/app/frontend
command: "npm start"
restart: "on-failure"
depends_on:
- backend
networks:
- mynetwork
volumes:
db_data:
networks:
mynetwork:
driver: bridge