-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (73 loc) · 2.3 KB
/
docker-compose.yml
File metadata and controls
77 lines (73 loc) · 2.3 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
---
version: '3.7'
# This is the BASE docker-compose file, specifying the baseline settings for
# SPBM. When executing "docker-compose up" this file and the override file
# docker-compose.override.yml will be loaded which overrides certain parts.
#
# For a production environment you must manually specify the production
# compose file and the base with:
# docker-compose -f docker-compose.yml -f docker-compose.prod.yml <args>
services:
spbm:
container_name: app
image: spbm
build: .
depends_on:
- nginx-proxy
- postgres
expose:
- 8000
volumes:
# Share static files with nginx proxy
- static-volume:/usr/src/app/static_files
environment:
- VIRTUAL_PROTO=http
- VIRTUAL_PORT=8000
env_file:
- ./container/spbm.env
postgres:
container_name: psql
# Note that psycopg2 is the main requirement for PSQL support, not Django
# itself per se. Thus, to upgrade PostgreSQL check psycopg2 support.
image: postgres:10.11
ports:
- 5432:5432
# "Sane" defaults that are overwritten
env_file:
- ./container/postgres.env
nginx-proxy:
container_name: nginx
image: jwilder/nginx-proxy
ports:
- 80:80
- 443:443
restart: always
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./container/nginx.vhost.default:/etc/nginx/vhost.d/default
- cert-volume:/etc/nginx/certs:ro
- vhost-volume:/etc/nginx/vhost.d
- static-volume:/usr/src/static
- html-volume:/usr/share/nginx/html
environment:
- ENABLE_IPV6=true
# nginx-companion:
# container_name: nginx-letsencrypt
# depends_on:
# - nginx-proxy
# restart: always
# image: jrcs/letsencrypt-nginx-proxy-companion
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock:ro
# - cert-volume:/etc/nginx/certs:rw
# - vhost-volume:/etc/nginx/vhost.d
# - html-volume:/usr/share/nginx/html
volumes:
# Used to share static files with nginx directly
static-volume:
# Used to synchcronise Let's Encrypt certificates
cert-volume:
# Used to synchcronise Let's Encrypt vhost configurations
vhost-volume:
# Used to perform Let's Encrypt certificate requests and confirmation
html-volume: