forked from CMP26Projects/ScoutManagementSystem
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
85 lines (79 loc) · 1.71 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
services:
db:
image: postgres:16
restart: always
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
volumes:
- db-data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- backend
frontend:
build:
context: ./client
dockerfile: Dockerfile.dev
volumes:
- ./client:/app
- /app/node_modules
ports:
- "3000:3000"
environment:
- VITE_API_URL=http://localhost:5000
networks:
- frontend
command: npm run dev
backend:
build:
context: ./server
dockerfile: Dockerfile.dev
volumes:
- ./server:/app
- /app/node_modules
ports:
- "5000:5000"
environment:
FRONTEND_URL: http://localhost:3000
DB_HOST: db
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME}
DATABASE_URL: postgresql://${DB_USER}:${DB_PASSWORD}@db:5432/${DB_NAME}?sslmode=disable
JWT_SECRET: ${JWT_SECRET}
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN}
PORT: 5000
depends_on:
- db
networks:
- backend
- frontend
command: npm run start
adminer:
image: adminer
restart: always
ports:
- "8080:8080"
networks:
- backend
pgadmin:
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
PGADMIN_CONFIG_SERVER_MODE: 'False'
volumes:
- pgadmin-data:/var/lib/pgadmin
ports:
- "5050:80"
networks:
- backend
networks:
backend:
frontend:
volumes:
db-data:
pgadmin-data: