forked from toobigtoignore/issf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yml
81 lines (77 loc) · 2.01 KB
/
docker-compose-dev.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# ISSF - Information System on Small Scale Fisheries
# Author: Joshua Murphy
# Date: December 23rd, 2018
# https://github.com/toobigtoignore/issf
# Docker Compose file to orchestrate the containers needed to run ISSF
# as well as a PostgreSQL/PostGIS database
version: '3'
services:
web:
image: tbti/web:latest
#build: "."
#command: "/bin/bash -c 'yes'"
command: "/bin/sh -c 'npm i && python manage.py collectstatic --noinput && gunicorn issf_prod.wsgi -b 0.0.0.0:80'"
restart: always
depends_on:
- db
environment:
- DJANGO_SETTINGS_MODULE=issf_prod.settings
volumes:
- "./:/issf:Z"
- "./static:/static:Z"
expose:
- 80
stdin_open: true
tty: true
logging:
driver: json-file
options:
max-size: "10m"
max-file: "10"
db:
image: mdillon/postgis:9.5-alpine
expose:
- 5432
ports:
- "5432:5432"
restart: always
volumes:
- "./scripts:/scripts:Z"
- "./data/postgres:/data/postgres/:Z"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "10"
nginx:
image: nginx:alpine
expose:
- 80
depends_on:
- web
restart: always
volumes:
- "./:/src:Z"
- "./data/nginx:/etc/nginx/conf.d:Z"
- "./static:/static:Z"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "10"
labels:
traefik.enable: true
traefik.frontend.rule: "Host:issfcloud.localhost"
traefik.port: 80
traefik.frontend.entryPoints: "https"
traefik:
image: traefik:1.7 # The official Traefik docker image
command: --api --docker # Enables the web UI and tells Traefik to listen to docker
ports:
- "80:80" # The HTTP port
- "443:443"
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events
- ./data/traefik/traefik.toml:/traefik.toml
- ./data/traefik:/traefik_data/