forked from readthedocs/readthedocs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.override.yml
95 lines (84 loc) · 3.06 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
83
84
85
86
87
88
89
90
91
92
93
94
95
# 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 `community.dev.readthedocs.io` 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_TOKEN: ${GITHUB_TOKEN:-}
nginx:
networks:
readthedocs:
ipv4_address: 10.10.0.100
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:
- "community.dev.readthedocs.io: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
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
storage:
# https://github.com/Azure/Azurite
# Pin the version of Azurite as there are sometimes backwards incompatible changes
image: mcr.microsoft.com/azure-storage/azurite:3.5.0
volumes:
- storage_data:/data
ports:
- "10000:10000"
networks:
readthedocs:
command: ["azurite-blob", "--silent", "--blobPort", "10000", "--blobHost", "0.0.0.0", "--location", "/data", "--loose"]
azure-cli:
image: microsoft/azure-cli
volumes:
- ${PWD}/common/dockerfiles/scripts/create-containers.sh:/usr/local/bin/create-containers.sh
environment:
- INIT=${INIT:-}
links:
- storage
depends_on:
- storage
networks:
readthedocs:
command: ["/usr/local/bin/create-containers.sh"]