forked from pypi/warehouse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
85 lines (77 loc) · 2.41 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
84
85
db:
image: postgres:9.5
ports:
# 5432 may already in use by another PostgreSQL on host
- "5433:5432"
redis:
image: redis:latest
rabbitmq:
image: rabbitmq:latest
elasticsearch:
image: elasticsearch:2.2
camo:
image: pypa/warehouse-camo:latest
ports:
- "9000:9000"
environment:
CAMO_KEY: "insecure camo key"
app:
build: .
volumes:
# We specify all of these directories instead of just . because we want to
# avoid having ./node_modules from the host OS being shared with the docker
# container, and since there's no way to exclude a directory, the only way
# to make this work is to share multiple, smaller directories. These cover
# the important things that we want to share, but changes to requirements
# or any file not in these directories will require a rebuild.
# The :z option fixes permission issues with SELinux by setting a
# permissive security context.
- ./dev:/app/dev:z
- ./docs:/app/docs:z
- ./warehouse:/app/warehouse:z
- ./tests:/app/tests:z
environment:
WAREHOUSE_ENV: development
WAREHOUSE_TOKEN: insecuretoken
# Uncomment the below line if you're working on the PyPI theme, this is a
# private repository due to the fact that other people's IP is contained in
# it.
# WAREHOUSE_THEME: pypi_theme.pypi
AMQP_URL: amqp://guest@rabbitmq:5672//
DATABASE_URL: postgresql://postgres@db/warehouse
ELASTICSEARCH_URL: http://elasticsearch:9200/development
REDIS_URL: redis://redis:6379/0
SESSION_SECRET: "an insecure development secret"
CAMO_URL: "{request.scheme}://{request.domain}:9000/"
CAMO_KEY: "insecure camo key"
DOCS_URL: "https://pythonhosted.org/{project}/"
FILES_BACKEND: "warehouse.packaging.services.LocalFileStorage path=/app/data/packages/ url=http://files.example.com/packages/{path}"
RECAPTCHA_SITE_KEY: "${RECAPTCHA_SITE_KEY}"
RECAPTCHA_SECRET_KEY: "${RECAPTCHA_SECRET_KEY}"
STATUSPAGE_URL: https://2p66nmmycsj3.statuspage.io
web:
extends:
service: app
command: gunicorn -b 0.0.0.0:8000 -n warehouse --reload warehouse.wsgi
environment:
PORT: 8000
ports:
- "80:8000"
links:
- db
- redis
- rabbitmq
- elasticsearch
worker:
extends:
service: app
command: celery -A warehouse worker -l info --autoreload
links:
- db
- redis
- rabbitmq
- elasticsearch
static:
extends:
service: app
command: gulp watch