-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
91 lines (89 loc) · 2.66 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: "3.9"
services:
frontend:
restart: unless-stopped
build:
context: frontend
depends_on:
- backend
ports:
- "${FRONTEND_PORT}:3000"
environment:
API_URL: "http://localhost:${BACKEND_PORT}"
volumes:
- ./frontend/src:/usr/src/app/src:ro
- ./frontend/public:/usr/src/app/public
- ./frontend/node_modules:/usr/src/app/node_modules
- type: bind
source: ./frontend/yarn.lock
target: /usr/src/app/yarn.lock
- type: bind
source: ./frontend/package.json
target: /usr/src/app/package.json
- type: bind
source: ./frontend/craco.config.js
target: /usr/src/app/craco.config.js
- type: bind
source: ./frontend/start_frontend.sh
target: /usr/src/app/start_frontend.sh
- type: bind
source: ./frontend/tailwind.config.js
target: /usr/src/app/tailwind.config.js
- type: bind
source: ./frontend/tsconfig.json
target: /usr/src/app/tsconfig.json
backend:
restart: unless-stopped
build:
context: backend
depends_on:
- db
ports:
- "${BACKEND_PORT}:${BACKEND_PORT}"
env_file: .env
environment:
PG_HOST: db
volumes:
- ./backend/src:/usr/src/app/src:ro
- ./backend/tests:/usr/src/app/tests:ro
- ./backend/migrations_src:/usr/src/app/migrations_src:ro
- ./backend/seeds:/usr/src/app/seeds:ro
- ./.env.template:/usr/src/.env.template:ro
- ./backend/node_modules:/usr/src/app/node_modules
- type: bind
source: ./backend/yarn.lock
target: /usr/src/app/yarn.lock
- type: bind
source: ./backend/package.json
target: /usr/src/app/package.json
- type: bind
source: ./backend/knexfile.js
target: /usr/src/app/knexfile.js
- type: bind
source: ./backend/start_backend.sh
target: /usr/src/app/start_backend.sh
- type: bind
source: ./backend/tsconfig.json
target: /usr/src/app/tsconfig.json
- type: bind
source: ./backend/tsconfig.migrations.json
target: /usr/src/app/tsconfig.migrations.json
- type: bind
source: ./backend/tsconfig.app.json
target: /usr/src/app/tsconfig.app.json
db:
image: postgres
restart: unless-stopped
ports:
- "${PG_PORT}:${PG_PORT}"
environment:
POSTGRES_USER: "${PG_USER}"
POSTGRES_DB: "${PG_DATABASE}"
POSTGRES_PASSWORD: "${PG_PASSWORD}"
adminer:
image: adminer
restart: unless-stopped
depends_on:
- db
ports:
- "9091:8080"