-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
80 lines (75 loc) · 1.57 KB
/
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
services:
frontend:
build:
context: ./frontend
target: build
command: pnpm dev --host
depends_on:
- backend
networks:
- workout-tracker-net
volumes:
- ./frontend:/app
#- /app/node_modules
expose:
- 5173
ports:
- 127.0.0.1:3001:5173
backend:
build:
context: ./backend
target: build
command: pnpm dev
depends_on:
- db
environment:
- CONNECTION_STRING=postgresql://postgres:dev@db:5432/postgres
- DB_CONNECTION_STRING=postgresql://postgres:dev@db:5432/wdb
- DBNAME=wdb
- JWT_KEY=development
- TZ=Asia/Calcutta
ports:
- 127.0.0.1:3000:3000
expose:
- 3000
volumes:
- ./backend:/app
#- /app/node_modules
networks:
- workout-tracker-net
db:
image: postgres:16-alpine
expose:
- 5432
# Also expose the DB on the local machine so that tests can run on it
ports:
- 127.0.0.1:5432:5432
networks:
- workout-tracker-net
volumes:
- db_volume:/var/lib/postgresql/data
restart: always
environment:
- POSTGRES_PASSWORD=dev
pgadmin:
image: dpage/pgadmin4
restart: always
ports:
- "8080:80"
networks:
- workout-tracker-net
volumes:
- pgadmin_volume:/var/lib/pgadmin
environment:
- PGADMIN_DEFAULT_EMAIL=admin@localhost.com
- PGADMIN_DEFAULT_PASSWORD=dev
depends_on:
- db
networks:
workout-tracker-net:
driver: bridge
volumes:
db_volume:
driver: local
pgadmin_volume:
driver: local