-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
46 lines (44 loc) · 1.03 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
# Docker and Nginx setup created with help from the
# following sources:
# General Setup: https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/
# SSL certificates: https://faun.pub/setting-up-ssl-certificates-for-nginx-in-docker-environ-e7eec5ebb418
version: "3"
services:
database:
image: postgres:14.4-alpine
env_file:
- .env
environment:
- POSTGRES_USER=${BUSME_USER}
- POSTGRES_PASSWORD=${BUSME_PASSWORD}
volumes:
- ./backup.sql:/docker-entrypoint-initdb.d/backup.sql
ports:
- "5432:5432"
backend:
build: ./backend
volumes:
- staticfiles:/backend/staticfiles
ports:
- "8000:8000"
working_dir: /backend/
env_file:
- .env
depends_on:
- database
nginx:
build:
context: .
args:
REACT_APP_GOOGLE_KEY: ${REACT_APP_GOOGLE_KEY}
ports:
- "80:80"
- "443:443"
volumes:
- staticfiles:/staticfiles
env_file:
- .env
depends_on:
- backend
volumes:
staticfiles: