-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
64 lines (60 loc) · 1.4 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
# sales: Docker Compose
# https://docs.docker.com/compose/
#
# Usage: docker-compose up
version: '3'
services:
# PostgreSQL database
db:
restart: always
image: dgnest/postgres:9.6
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=sales
- POSTGRES_TEST_DB=sales_test
- POSTGRES_TEST_USER=postgres
- POSTGRES_TEST_PASSWORD=postgres
env_file: .env
volumes:
- sales-db:/var/lib/postgresql/data #using the declared volume
ports:
- "5432:5432"
nodejs:
restart: always
image: dgnest/node:6.10.0
volumes:
- .:/app
env_file: .env
build:
context: .
dockerfile: docker/nodejs/Dockerfile
# Django web application
web:
restart: always
image: python:3.6.1
build:
context: .
dockerfile: docker/web/Dockerfile
hostname: web
depends_on:
- db
ports:
- "80:8000"
- "8000:5000"
volumes:
- ./:/app
environment: &environment
- DB_DEFAULT_URL=postgres://postgres:postgres@db:5432/sales
- DB_TEST_URL=postgres://postgres:postgres@db:5432/sales_test
- C_FORCE_ROOT=True
- SITE_NAME=sales
- IS_SECURE=True
- DEBUG=True
- SECRET_KEY=j36%5df7q5+ov)wz+(=vt7d81ka^xx!5%0)nx=z2i&)*5r^
- STATIC_URL=static/
env_file: .env
volumes:
sales-db:
external:
name: sales-volume-postgre