forked from mozilla-releng/shipit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
111 lines (106 loc) · 3.36 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
version: '3'
services:
api:
build:
context: api
dockerfile: Dockerfile
ports:
- "8015:8015"
# Mounting these three specific volumes is done to ensure that autoreloading
# changes to python code works without breaking the console scripts that
# are installed. If we mount the entire `api` directory, it overwrites
# the egg files that are inside the docker containers, which means that
# scripts like `shipit_trigger_product_details` do not work.
# If we don't volume mount at all, python code changes are not picked up
# until we rebuild the docker container
volumes:
- ./api/src/backend_common:/app/src/backend_common
- ./api/src/cli_common:/app/src/cli_common
- ./api/src/shipit_api:/app/src/shipit_api
- "./api/products.yml:/app/products.yml"
- "./api/trust-domains.yml:/app/trust-domains.yml"
environment:
- HOST=0.0.0.0
- PORT=8015
- APP_CHANNEL=development
- DATABASE_URL=postgresql://shipituser:shipitpassword@db/shipitdb
- AUTH_CLIENT_ID=todo
- AUTH_CLIENT_SECRET=todo
- AUTH_DOMAIN=auth.mozilla.auth0.com
- SECRET_KEY_BASE64=bm90YXNlY3JldA== # notasecret
- TASKCLUSTER_CLIENT_ID
- TASKCLUSTER_ACCESS_TOKEN
- TASKCLUSTER_ROOT_URL=https://firefox-ci-tc.services.mozilla.com
- GITHUB_TOKEN
- GITHUB_SKIP_PRIVATE_REPOS=1
- XPI_MANIFEST_OWNER=mozilla-releng
- XPI_MANIFEST_REPO=staging-xpi-manifest
- LOG_FORMAT=plain
depends_on:
- db
healthcheck:
test: ["CMD", "curl", "-fk", "https://localhost:8015/__heartbeat__"]
interval: 10s
timeout: 5s
retries: 5
public:
build:
context: api
dockerfile: Dockerfile.public
ports:
- "8016:8016"
# See comment on the api container for the reasoning behind these mounts
volumes:
- ./api/src/backend_common:/app/src/backend_common
- ./api/src/cli_common:/app/src/cli_common
- ./api/src/shipit_api:/app/src/shipit_api
- "./api/products.yml:/app/products.yml"
environment:
- HOST=0.0.0.0
- PORT=8016
- APP_CHANNEL=development
- DATABASE_URL=postgresql://shipituserreadonly:shipitpasswordreadonly@db/shipitdb
- LOG_FORMAT=plain
depends_on:
- db
- api
db:
image: postgres:11
ports:
- "5432:5432"
volumes:
- dbstore:/var/lib/postgresql/data
- ./api/docker.d/postgres_create_readonly_user.sh:/docker-entrypoint-initdb.d/postgres_create_readonly_user.sh
environment:
- POSTGRES_USER=shipituser
- POSTGRES_PASSWORD=shipitpassword
- POSTGRES_DB=shipitdb
healthcheck:
test: ["CMD-SHELL", "-c", "pg_isready -U shipituser -d shipitdb"]
interval: 10s
timeout: 5s
retries: 5
ui:
# SSL doesn't work with node:current
image: node:16
ports:
- "8010:8010"
volumes:
- ./frontend:/app
- node_modules:/app/node_modules
environment:
- HOST=0.0.0.0
- PORT=8010
- SHIPIT_API_URL=https://localhost:8015
- SHIPIT_PUBLIC_API_URL=https://localhost:8016
- DEPLOYMENT_BRANCH=development
- FRONTEND_TASKCLUSTER_ROOT_URL=https://firefox-ci-tc.services.mozilla.com
entrypoint:
- /bin/bash
- --login
- -c
- cd /app && yarn install && yarn start
# TODO: worker, maybe pulse?
volumes:
dbstore:
node_modules: