forked from readthedocs/readthedocs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.override.yml
82 lines (72 loc) · 2.88 KB
/
docker-compose.override.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
# docker-compose.override.yml file to launch a full instance of Read the Docs.
#
# Read the Docs' Core team is using docker-compose internally.
# We do not offer support on this file and configuration at this point.
# DO NOT USE DOCKER-COMPOSE SETUP FOR PRODUCTION OR CUSTOM INSTALLATION.
# We create this network here to be able to use a static IP for NGINX.
# This is needed because hitting `devthedocs.org` from
# any service will fail since it will resolve to 127.0.0.1, but
# instead we need to hit NGINX's IP (this is used on Embed API from
# -ext for example) Setting a static IP for NGINX, allow us to
# override /etc/hosts with this IP.
version: '3'
networks:
readthedocs:
driver: bridge
ipam:
config:
- subnet: 10.10.0.0/16
services:
server:
build:
args:
GITHUB_USER: ${GITHUB_USER:-}
GITHUB_TOKEN: ${GITHUB_TOKEN:-}
nginx:
networks:
readthedocs:
ipv4_address: 10.10.0.100
environment:
- NGINX_WEB_SERVER_NAME=${NGINX_WEB_SERVER_NAME:-devthedocs.org}
- NGINX_PROXITO_SERVER_NAME=${NGINX_PROXITO_SERVER_NAME:-*.devthedocs.org *.build.devthedocs.org}
proxito:
image: community_server:latest
volumes:
- ${PWD}:/usr/src/app/checkouts/readthedocs.org
- ${PWD}/dockerfiles/settings/proxito.py:/usr/src/app/checkouts/readthedocs.org/readthedocs/settings/proxito_docker.py
environment:
- DJANGO_SETTINGS_MODULE=readthedocs.settings.proxito_docker
web:
image: community_server:latest
volumes:
- ${PWD}:/usr/src/app/checkouts/readthedocs.org
- ${PWD}/dockerfiles/settings/web.py:/usr/src/app/checkouts/readthedocs.org/readthedocs/settings/web_docker.py
environment:
- DJANGO_SETTINGS_MODULE=readthedocs.settings.web_docker
- HOSTIP=${HOSTIP:-}
extra_hosts:
- "${NGINX_WEB_SERVER_NAME:-devthedocs.org}:10.10.0.100"
celery:
image: community_server:latest
volumes:
- ${PWD}:/usr/src/app/checkouts/readthedocs.org
- ${PWD}/dockerfiles/settings/celery.py:/usr/src/app/checkouts/readthedocs.org/readthedocs/settings/celery_docker.py
environment:
- DJANGO_SETTINGS_MODULE=readthedocs.settings.celery_docker
- CELERY_APP_NAME=readthedocs
celery-beat:
image: community_server:latest
volumes:
- ${PWD}:/usr/src/app/checkouts/readthedocs.org
- ${PWD}/dockerfiles/settings/celery.py:/usr/src/app/checkouts/readthedocs.org/readthedocs/settings/celery_docker.py
environment:
- DJANGO_SETTINGS_MODULE=readthedocs.settings.celery_docker
- CELERY_APP_NAME=readthedocs
build:
image: community_server:latest
volumes:
- ${PWD}:/usr/src/app/checkouts/readthedocs.org
- ${PWD}/dockerfiles/settings/build.py:/usr/src/app/checkouts/readthedocs.org/readthedocs/settings/build_docker.py
environment:
- DJANGO_SETTINGS_MODULE=readthedocs.settings.build_docker
- CELERY_APP_NAME=readthedocs