-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
41 lines (41 loc) · 1.03 KB
/
compose.yaml
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
version: '3.9'
volumes:
local_postgres_data:
name: ${DJANGO_APP_NAME}_data
services:
postgres:
container_name: postgres_container
image: postgres:14.5
restart: always
ports:
- '5432:5432'
volumes:
# Persist the data between container invocations
- local_postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=${DJANGO_APP_NAME}
- POSTGRES_USER=${DJANGO_APP_NAME}
- POSTGRES_PASSWORD=${DJANGO_APP_NAME}
web:
container_name: web_container
restart: always
build: .
depends_on:
- postgres
volumes:
- .:/app
ports:
- 8000:8000
command: poetry run python /app/manage.py runserver 0.0.0.0:8000
pgadmin:
container_name: pgadmin4_container
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: admin@email.com
PGADMIN_DEFAULT_PASSWORD: "${DJANGO_APP_NAME}"
ports:
- 5050:80
networks:
default:
name: "${DJANGO_APP_NAME}_network"