-
Notifications
You must be signed in to change notification settings - Fork 15
/
docker-compose.yml
63 lines (57 loc) · 1.28 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
version: '3.7'
x-server-env: &server-env
DJANGO_SETTINGS_MODULE: config.settings.docker
DJANGO_ENV_FILE: .docker.env
DJANGO_SECRET_KEY: stage-dummy-key1
SECRET_KEY: stage-dummy-key1
DATABASE_URL: postgres://postgres:postgres@db/postgres
RDS_DB_NAME: ${RDS_DB_NAME:-postgres}
RDS_USERNAME: ${RDS_USERNAME:-postgres}
RDS_PASSWORD: ${RDS_PASSWORD:-pass.123}
RDS_HOSTNAME: ${RDS_HOSTNAME:-db}
RDS_PORT: 5432
services:
db:
restart: always
image: postgres:11.8
environment:
- POSTGRES_PASSWORD=postgres
volumes:
- /var/lib/postgresql/data
- /data
nginx:
restart: always
build: ./nginx/
ports:
- "80:80"
volumes:
- ./staticfiles:/www/static
depends_on:
- web
web:
build:
context: ./server/
volumes:
- ./logs:/var/app/logs
- ./server:/var/app
- ./staticfiles:/www/static
ports:
- "8000:8000"
command: /var/app/runserver.sh
depends_on:
- db
environment:
<<: *server-env
init:
build:
context: ./server/
volumes:
- ./logs:/var/app/logs
- ./server:/var/app
- ./staticfiles:/www/static
command: ["sh", "-c", "/var/app/server-init.sh"]
restart: "no"
depends_on:
- db
environment:
<<: *server-env