-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
42 lines (39 loc) · 900 Bytes
/
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
version: '3'
services:
app:
build: .
links:
- mongodb
container_name: template-app
env_file:
- ".env"
environment:
- db_username=${db_username}
- db_password=${db_password}
command: uvicorn main:app --host 0.0.0.0 --port 80 --reload
ports:
- "8000:80"
volumes:
- .:/app:consistent
- ./static:/app/static:consistent
depends_on:
- mongodb
- frontend
mongodb:
container_name: template-mongo
image: mongo:latest
restart: unless-stopped
env_file:
- ".env"
environment:
- MONGO_INITDB_ROOT_USERNAME=${db_username}
- MONGO_INITDB_ROOT_PASSWORD=${db_password}
ports:
- "27017:27017"
frontend:
build: ./node
container_name: template-node
command: npm run dev
volumes:
- ./static:/app/static:consistent
- ./node/assets:/app/assets