-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
90 lines (82 loc) · 2.06 KB
/
docker-compose.yml
File metadata and controls
90 lines (82 loc) · 2.06 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
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
services:
postgres:
image: postgres:16
container_name: pharmago_postgres
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
redis:
image: redis:7-alpine
container_name: pharmago_redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: pharmago_backend
env_file:
- ./backend/.env
volumes:
- ./backend:/app
ports:
- "8000:8000"
depends_on:
- postgres
- redis
command: python manage.py runserver 0.0.0.0:8000
web:
build:
context: ./web-frontend
dockerfile: Dockerfile
container_name: pharmago_web
environment:
- CHOKIDAR_USEPOLLING=true # helps with file change detection on Windows
- WATCHPACK_POLLING=true
- REACT_APP_API_URL=http://backend:8000/api
volumes:
- ./web-frontend:/app:cached
- /app/node_modules
ports:
- "3000:3000"
depends_on:
- backend
# Optional: pgAdmin UI
pgadmin:
image: dpage/pgadmin4:8
container_name: pharmago_pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
PGADMIN_CONFIG_SERVER_MODE: 'False'
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False'
PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION: 'False'
PGADMIN_CONFIG_LOGIN_BANNER: 'False'
PGADMIN_CONFIG_CONSOLE_LOG_LEVEL: '10'
PGADMIN_CONFIG_WTF_CSRF_ENABLED: 'False'
PGADMIN_CONFIG_SESSION_COOKIE_SECURE: 'False'
ports:
- "127.0.0.1:8082:80"
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
- postgres
restart: unless-stopped
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
volumes:
pgdata:
pgadmin_data:
redis_data: