forked from jslay88/django_learn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
42 lines (39 loc) · 851 Bytes
/
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
version: "3.4"
volumes:
db_data:
services:
db:
image: postgres:alpine
user: postgres
restart: always
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- "5432:5432"
app:
image: django_learn:dev
build:
context: .
dockerfile: Dockerfile
depends_on:
- db
stdin_open: true
tty: true
environment:
DJANGO_SETTINGS_MODULE: django_learn.settings.dev_docker
PGDATABASE: postgres
PGUSER: postgres
PGPASSWORD: postgres
PGHOST: db
PGPORT: 5432
RUN_MIGRATIONS: true
SECRET_KEY: abcdefghijklmnopqrstuvwxyz
ports:
- "8000:8000"
volumes: &python_volumes
- ./:/src/
- ./.env:/etc/profile.d/dev-env.sh