-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose.yml
160 lines (159 loc) · 5.96 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
version: '3.4'
services:
build-requirements:
build:
context: ./
dockerfile: ./Dockerfile-dev
target: python_base
volumes:
- ./:/app
command: sh -c "cd /app && pip install pip --upgrade && pip install pip-tools && python -m piptools compile requirements.in --generate-hashes --allow-unsafe --upgrade"
lando-api:
build:
context: ./
dockerfile: ./Dockerfile-dev
image: lando-api
command: ["run", "--host=0.0.0.0", "--port=8888"]
ports:
- "8888:8888"
environment:
- BUGZILLA_URL=https://bugzilla-dev.allizom.org/
- BUGZILLA_API_KEY=asdfasdfasdfasdfasdfasdf
- PHABRICATOR_URL=https://phabricator-dev.allizom.org/
- PHABRICATOR_ADMIN_API_KEY=api-0123456789012345678901234567
- PHABRICATOR_UNPRIVILEGED_API_KEY=api-0123456789012345678901234567
- DATABASE_URL=postgresql://postgres:password@lando-api.db/lando_api_dev
- ENV=localdev
- SENTRY_DSN=
- LANDO_UI_URL=https://lando.test
- OIDC_IDENTIFIER=https://lando-api.test
- OIDC_DOMAIN=https://auth0.test
# - CSP_REPORTING_URL=/__cspreport__
- CACHE_REDIS_HOST=redis.cache
# - CACHE_REDIS_PORT=
# - CACHE_REDIS_PASSWORD=
# - CACHE_REDIS_DB=
# Setting this to any non-empty value will disable the Celery job system and all
# features that rely on it.
- DISABLE_CELERY=
# See http://docs.celeryproject.org/en/latest/userguide/configuration.html#broker-url
# for the full URL format.
- CELERY_BROKER_URL=redis://redis.queue/0
# ------------------------------------------------------------------------
# Local Development Flags, edit in docker-compose.override.yml
# https://docs.docker.com/compose/extends/#example-use-case
# ------------------------------------------------------------------------
# LOCALDEV_MOCK_AUTH0_USER: Set to 'default' to use a default user with
# valid landing permissions in when an auth0 user is required in local
# dev. You must still pass a Bearer token header, it can be invalid.
# Set to 'inject_valid' to load users from the provided token and inject
# LDAP claims for valid landing permission. Set to 'inject_invalid' to
# inject invalid permissions.
- LOCALDEV_MOCK_AUTH0_USER=
# So that the container can write volume mounted files during development.
user: root
volumes:
- ./:/app
- ./migrations/:/migrations/
# Prevent writing python cache to the host.
- caches_pycache:/app/tests/__pycache__/
- caches_cache:/app/.cache/
- caches_pytest_cache:/app/.pytest_cache
depends_on:
- lando-api.db
- redis.cache
- redis.queue
lando-api.worker:
image: lando-api
command: ["worker"]
environment:
- ENV=localdev
- SENTRY_DSN=
# See http://docs.celeryproject.org/en/stable/getting-started/brokers/redis.html#configuration
# for the full URL format.
- CELERY_BROKER_URL=redis://redis.queue/0
- OIDC_IDENTIFIER=https://lando-api.test
- OIDC_DOMAIN=https://auth0.test
# The base URL of the Lando website that users interact with.
# e.g. https://lando.test
- LANDO_UI_URL=https://lando.test
# The email address to send mail from.
- MAIL_FROM=email_testing@example.test
# The hostname of the SMTP server used to notify Lando users of landing failures.
- MAIL_SERVER=smtp
- MAIL_PORT=25
# Whether the connection should use an SSL socket immediately, rather than
# starttls after connecting, if the server requires it.
- MAIL_USE_SSL=
# Should the connection use starttls to enable TLS after connecting.
- MAIL_USE_TLS=
- MAIL_USERNAME=
- MAIL_PASSWORD=
# Set this flag to any non-empty value to have the worker log a message instead of
# connecting to the SMTP server.
- MAIL_SUPPRESS_SEND=
# A space-delimited list of email addresses. If set this will limit mail sending
# to the listed recipients. Mail to recipients not on the list will be logged
# instead. Leave this setting empty to allow all email addresses through.
- MAIL_RECIPIENT_WHITELIST=
user: root
volumes:
- ./:/app
- ./migrations/:/migrations/
# Prevent writing python cache to the host.
- caches_cache:/app/.cache/
depends_on:
- redis.queue
- smtp
lando-api.landing-worker:
image: lando-api
command: ["landing-worker"]
environment:
- ENV=localdev
- DATABASE_URL=postgresql://postgres:password@lando-api.db/lando_api_dev
- SENTRY_DSN=
# See http://docs.celeryproject.org/en/stable/getting-started/brokers/redis.html#configuration
# for the full URL format.
- CELERY_BROKER_URL=redis://redis.queue/0
- OIDC_IDENTIFIER=https://lando-api.test
- OIDC_DOMAIN=https://auth0.test
- LANDO_UI_URL=https://lando.test
- REPO_CLONES_PATH=/repos
- REPOS_TO_LAND=localdev
user: root
volumes:
- ./:/app
- ./migrations/:/migrations/
# Prevent writing python cache to the host.
- caches_cache:/app/.cache/
depends_on:
- lando-api.db
- redis.queue
lando-api.db:
image: postgres:14
platform: linux/amd64
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_USER=postgres
volumes:
- postgres_db:/var/lib/postgresql/data
- ./docker/postgres-init-scripts/:/docker-entrypoint-initdb.d/
ports:
- "54321:5432"
redis.cache:
image: redis:3.2-alpine # Elasticache version.
redis.queue:
image: redis:3.2-alpine
smtp:
image: python:3-alpine
command: python3 -u -m smtpd -c DebuggingServer -n --debug 0.0.0.0:25
expose:
- "25"
volumes:
postgres_db:
caches_pycache:
caches_cache:
caches_pytest_cache: