-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose.yml
159 lines (151 loc) · 4.33 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
# SPDX-License-Identifier: Apache-2.0
version: '3'
services:
# The `ui` compose service hosts the Vela UI.
#
# This component is used for providing a user-friendly
# interface for triggering actions in the Vela system.
#
# https://go-vela.github.io/docs/administration/ui/
ui:
build:
context: .
dockerfile: Dockerfile.local
container_name: ui
image: ui:local
networks:
- vela
env_file:
- .env
restart: always
ports:
- '8888:80'
depends_on:
- server
# The `server` compose service hosts the Vela server and API.
#
# This component is used for processing web requests and
# managing resources in the database and publishing
# builds to the FIFO queue.
#
# https://go-vela.github.io/docs/administration/server/
server:
container_name: server
image: target/vela-server:latest
networks:
- vela
environment:
DATABASE_DRIVER: postgres
DATABASE_ADDR: 'postgres://vela:zB7mrKDTZqNeNTD8z47yG4DHywspAh@postgres:5432/vela?sslmode=disable'
DATABASE_COMPRESSION_LEVEL: 3
DATABASE_ENCRYPTION_KEY: 'C639A572E14D5075C526FDDD43E4ECF6'
QUEUE_DRIVER: redis
QUEUE_ADDR: 'redis://redis:6379'
QUEUE_PRIVATE_KEY: 'tCIevHOBq6DdN5SSBtteXUusjjd0fOqzk2eyi0DMq04NewmShNKQeUbbp3vkvIckb4pCxc+vxUo+mYf/vzOaSg=='
QUEUE_PUBLIC_KEY: 'DXsJkoTSkHlG26d75LyHJG+KQsXPr8VKPpmH/78zmko='
SCM_DRIVER: github
SCM_CONTEXT: 'continuous-integration/vela'
SECRET_VAULT: 'true'
SECRET_VAULT_ADDR: 'http://vault:8200'
SECRET_VAULT_TOKEN: vela
VELA_ADDR: 'http://localhost:8080'
VELA_WEBUI_ADDR: 'http://localhost:8888'
VELA_LOG_LEVEL: trace
# comment the line below to use registration flow
VELA_SECRET: 'zB7mrKDTZqNeNTD8z47yG4DHywspAh'
VELA_SERVER_PRIVATE_KEY: 'F534FF2A080E45F38E05DC70752E6787'
VELA_USER_REFRESH_TOKEN_DURATION: 90m
VELA_USER_ACCESS_TOKEN_DURATION: 60m
VELA_DISABLE_WEBHOOK_VALIDATION: 'true'
VELA_ENABLE_SECURE_COOKIE: 'false'
VELA_REPO_ALLOWLIST: '*'
VELA_SCHEDULE_ALLOWLIST: '*'
env_file:
- .env
restart: always
ports:
- '8080:8080'
depends_on:
- postgres
- redis
- vault
# The `worker` compose service hosts the Vela build daemon.
#
# This component is used for pulling builds from the FIFO
# queue and executing them based off their configuration.
#
# https://go-vela.github.io/docs/administration/worker/
worker:
container_name: worker
image: target/vela-worker:latest
networks:
- vela
environment:
EXECUTOR_DRIVER: linux
QUEUE_DRIVER: redis
QUEUE_ADDR: 'redis://redis:6379'
VELA_BUILD_LIMIT: 1
VELA_BUILD_TIMEOUT: 30m
VELA_LOG_LEVEL: trace
VELA_RUNTIME_DRIVER: docker
VELA_RUNTIME_PRIVILEGED_IMAGES: 'target/vela-docker'
VELA_SERVER_ADDR: 'http://server:8080'
# comment the line below to use registration flow
VELA_SERVER_SECRET: 'zB7mrKDTZqNeNTD8z47yG4DHywspAh'
WORKER_ADDR: 'http://worker:8080'
WORKER_CHECK_IN: 5m
restart: always
ports:
- '8081:8080'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
depends_on:
- server
# The `redis` compose service hosts the Redis database.
#
# This component is used for publishing builds to a FIFO queue.
#
# https://redis.io/
redis:
container_name: redis
image: redis:7-alpine
networks:
- vela
ports:
- '6379:6379'
# The `postgres` compose service hosts the Postgresql database.
#
# This component is used for storing data at rest.
#
# https://www.postgresql.org/
postgres:
container_name: postgres
image: postgres:15-alpine
networks:
- vela
environment:
POSTGRES_DB: vela
POSTGRES_PASSWORD: 'zB7mrKDTZqNeNTD8z47yG4DHywspAh'
POSTGRES_USER: vela
ports:
- '5432:5432'
# The `vault` compose service hosts the HashiCorp Vault instance.
#
# This component is used for storing sensitive data like secrets.
#
# https://www.vaultproject.io/
vault:
image: hashicorp/vault:latest
container_name: vault
command: server -dev
networks:
- vela
environment:
VAULT_DEV_LISTEN_ADDRESS: 0.0.0.0:8200
VAULT_DEV_ROOT_TOKEN_ID: vela
ports:
- '8200:8200'
cap_add:
- IPC_LOCK
networks:
vela: