-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
65 lines (65 loc) · 1.78 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
services:
proxy:
build:
dockerfile: ./proxy/Dockerfile
context: ./
args:
VITE_BACKEND_URL: http://localhost
VITE_PAGE_TITLE: Plant Tracker
restart: always
volumes:
- ./media:/media
- ./static:/static
ports:
- 80:80
depends_on:
- django
django:
depends_on:
- db
build:
dockerfile: Dockerfile
context: ./
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ./plant_tracker:/app/plant_tracker
- ./media:/media
- ./static:/static
environment:
- SECRET_KEY=${SECRET_KEY}
- JWT_SIGNING_KEY=${JWT_SIGNING_KEY}
- JWT_ACCESS_TOKEN_LIFETIME_MINUTES=300
- JWT_ACCESS_REFRESH_LIFETIME_DAYS=${JWT_ACCESS_REFRESH_LIFETIME_DAYS}
- DEBUG=${DEBUG}
- ENABLE_REGISTRATION=${ENABLE_REGISTRATION}
- MEDIA_PATH=${MEDIA_PATH}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- ADMIN_EMAIL=${ADMIN_EMAIL}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- DATABASE_URL=psql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
db:
image: postgres:14.5
ports:
- "5432:5432"
volumes:
- ./db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
healthcheck:
test: ["CMD-SHELL", "pg_isready -q -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
environment:
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_PASSWORD}
ports:
- "5050:80"
depends_on:
- db