-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
83 lines (78 loc) · 1.84 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Foottrial: Docker Compose
# https://docs.docker.com/compose/
#
# Usage: docker-compose up
version: '3'
services:
# PostgreSQL database
db:
restart: always
image: dgnest/postgres:9.4
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=foottrial
ports:
- "5432:5432"
env_file:
- .env
volumes:
- pgvolume-9.4:/var/lib/postgresql/data #using the declared volume
nodejs:
restart: always
image: dgnest/node:6.10.0
env_file:
- .env
build:
context: .
dockerfile: docker/nodejs/Dockerfile
volumes:
- .:/app
# RabbitMQ
rabbit:
hostname: rabbit
image: rabbitmq:3.6.0-management
build: docker/rabbit
volumes:
- stored-rabbit:/var/lib/rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=mypass
- RABBITMQ_DEFAULT_VHOST=vhost
env_file: .env
ports:
- "5672:5672" # we forward this port because it's useful for debugging
- "15672:15672" # here, we can access rabbitmq management plugin
# Django web server
web:
restart: always
image: python:2.7.9
build:
context: .
dockerfile: docker/web/Dockerfile
hostname: web
depends_on:
- db
- rabbit
ports:
- "80:8080"
- "8080:5000"
volumes:
- .:/app
environment: &environment
- BROKER_URL=amqp://admin:mypass@rabbit:5672/vhost
- DB_URL=postgres://postgres:postgres@db:5432/foottrial
- C_FORCE_ROOT=True
- MEDIA_URL=media/
- IS_SECURE=True
- DEBUG=False
- SECRET_KEY=cj36%5df7q5+ov)wz+(=vt7d81ka^xx!5%0)nx=z2i&)*5r^
- STATIC_URL=static/
env_file: .env
volumes:
pgvolume-9.4:
external:
name: foottrial-pgvolume-9-4
stored-rabbit:
external:
name: foottrial-stored-rabbitmq