-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.production.yml
49 lines (44 loc) · 1.79 KB
/
docker-compose.production.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
# Docker-compose configuration for production
version: '2'
services:
django:
build:
context: .
dockerfile: Dockerfile-django.production
container_name: redux_saga_workshop_django
restart: unless-stopped
volumes:
- "./redux_saga_workshop/app/build:/app/app/build"
- "./redux_saga_workshop/app/webpack-stats.json:/app/app/webpack-stats.json"
- "/var/lib/docker-nginx/files/redux_saga_workshop/media:/files/media"
- "/var/lib/docker-nginx/files/redux_saga_workshop/assets:/files/assets"
- "/var/log/redux_saga_workshop:/var/log/redux_saga_workshop"
# For some reason the command also has to be specified here, otherwise the entrypoint+command combination won't
# work.
entrypoint: /usr/bin/wait-for-it.sh postgres:5432 -t 60 --
command: gunicorn redux_saga_workshop.wsgi:application --workers 2 --bind :80
depends_on:
- redis_redux_saga_workshop
external_links:
- postgres-9.5:postgres
node:
build:
context: .
dockerfile: Dockerfile-node
# Make this service no-op as we don't actually want it running but do want to use docker-compose file to define
# volumes etc.
restart: "no"
command: "true"
volumes:
- "./redux_saga_workshop/app:/app/app"
- "./redux_saga_workshop/static:/app/static:ro"
redis_redux_saga_workshop:
image: redis:3.2.8-alpine
restart: unless-stopped
volumes:
- "/var/lib/docker-redux_saga_workshop/redis:/data"
# NB: Network with this name must already exist on the server and be used by Nginx and Postgres.
networks:
default:
external:
name: private