-
Notifications
You must be signed in to change notification settings - Fork 19
/
docker-compose.yml
69 lines (63 loc) · 1.83 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
# Environment variables that control some of the behaviours in this file:
# PYCAN_DB_PORT=5432
# PYCAN_APP_PORT=8000
version: '3.3'
services:
database:
image: 'postgres:10.17'
ports:
- '${PYCAN_DB_PORT:-5432}:5432'
environment:
POSTGRES_DB: pycan_database
POSTGRES_USER: pycan_user
POSTGRES_PASSWORD: pycan_password
volumes:
- database-data:/var/lib/postgresql/data/
web:
build: .
image: pycan_web
volumes:
- ./:/var/www/pycan
- ./media:/var/www/media/
# https://bit.ly/2RNtK87
- vscode-extensions:/root/.vscode-server/extensions
ports:
- '${PYCAN_APP_PORT:-8000}:8000'
depends_on:
- database
- gulp
- redis
environment:
DATABASE_NAME: pycan_database
DATABASE_USER: pycan_user
DATABASE_PASSWORD: pycan_password
DATABASE_HOST: database
MEDIA_ROOT: /var/www/media
STATIC_ROOT: /var/www/static
REDIS_HOST: redis
TWITTER_API_KEY: "${TWITTER_API_KEY:-Dummy TWITTER_API_KEY}"
TWITTER_API_SECRET_KEY: "${TWITTER_API_SECRET_KEY:-Dummy TWITTER_API_SECRET_KEY}"
TWITTER_ACCESS_TOKEN: "${TWITTER_ACCESS_TOKEN:-Dummy TWITTER_ACCESS_TOKEN}"
TWITTER_ACCESS_TOKEN_SECRET: "${TWITTER_ACCESS_TOKEN_SECRET:-Dummy TWITTER_ACCESS_TOKEN_SECRET}"
command: >
bash -c "
./manage.py rqworker default low
& ./manage.py runserver 0.0.0.0:8000
&& fg"
gulp:
build:
context: .
dockerfile: Dockerfile-gulp
image: pycan_gulp:latest
volumes:
# Mount the code of the app
- ./:/var/www/pycan
# But hide the host's node_modules by creating an anonymous volume
# This is called "The node_modules volume trick"
- /var/www/pycan/node_modules
command: watch
redis:
image: 'redis:6.2'
volumes:
database-data:
vscode-extensions: