Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (53 loc) · 1.47 KB
/
Copy pathdocker-compose.yml
File metadata and controls
60 lines (53 loc) · 1.47 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
#the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
# version: '3.8'
name: chonker-finder
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
#frontend .env.local secret
secrets:
- env_local_file
ports:
- "3000:3000"
# env_file:
# - ./frontend/.env.local
volumes:
- ./frontend:/frontend
#avoid sync of node_modules in the container
- /frontend/node_modules
networks:
- chonker-net
backend:
build:
context: ./backend
dockerfile: Dockerfile
#backend .env and .flaskenv secret
secrets:
- env_file
- flaskenv_file
ports:
- "8080:8080"
# env_file:
# - ./backend/.env
# - ./backend/.flaskenv
volumes:
- ./backend:/backend
networks:
- chonker-net
# defines the secrets that will be made available to your Docker services during build
secrets:
env_file:
file: ./backend/.env
flaskenv_file:
file: ./backend/.flaskenv
env_local_file:
file: ./frontend/.env.local
networks:
chonker-net:
driver: bridge
# Docker port forwarding problem troubleshooting
# https://stackoverflow.com/questions/39525820/docker-port-forwarding-not-working
# https://www.reddit.com/r/docker/comments/xwfm08/why_do_i_need_to_specify_host0000_when_running_a/
# https://stackoverflow.com/questions/7023052/configure-flask-dev-server-to-be-visible-across-the-network