-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
186 lines (159 loc) · 7.34 KB
/
docker-compose.yaml
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
volumes:
stormkit:
redis:
psql:
services:
db:
image: postgres
restart: always
ports:
- published: 5432
target: 5432
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- psql:/var/lib/postgresql/data
redis:
container_name: redis
image: redis:6.2.12
restart: always
ports:
- published: 6379
target: 6379
volumes:
- redis:/data
redis-monitoring:
image: hibiken/asynqmon
ports:
- published: 8086
target: 8086
environment:
- PORT=8086
- REDIS_ADDR=redis:6379
workerserver:
image: ghcr.io/stormkit-io/workerserver:latest
restart: always
container_name: workerserver
volumes:
# Share deployments folder between workerserver and hosting.
# Deployments will be executed in the workerserver, and the artifacts
# are shared with the hosting service through this shared folder.
# This can be removed when using another service for deployments,
# such as GitHub actions or other CI/CD platforms.
- stormkit:/shared
environment:
- NODE_VERSION=22
# This is the domain that will be used to create the endpoints.
# For instance, for example.org, Stormkit creates these endpoints:
#
# health.example.org => an endpoint to verify the service is up and running
# api.example.org => the api service that Stormkit uses
# stormkit.example.org => the user interface to access your applications
# *.example.org => development endpoints
#
# NOTE: This is not the domain that you'd like to host. You configure those from
# the Stormkit UI.
- STORMKIT_DOMAIN=${STORMKIT_DOMAIN}
# The application secret that is used to encrypt/decrypt sensitive data.
# Do not expose this.
- STORMKIT_APP_SECRET=${STORMKIT_APP_SECRET}
# If you'd like to bring your own, external runner for deployments, configure
# this variable. Defaults to `local`. Possible values are: `github` (more services can be added on demand.)
- STORMKIT_DEPLOYER_SERVICE=${STORMKIT_DEPLOYER_SERVICE:-local}
# The maximum number of deployments that can run in parallel.
# If you are running on a single server, we suggest keeping this number low.
- STORMKIT_RUNNER_CONCURRENCY=1
# When `STORMKIT_DEPLOYER_SERVICE` is `github`, this variable is needed to
# trigger the GitHub Action.
- GITHUB_APP_TOKEN=${GITHUB_APP_TOKEN:-}
# Variables to access the PostgreSQL database
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
# Variable(s) to access Redis
- REDIS_ADDR=${REDIS_ADDR}
hosting:
image: ghcr.io/stormkit-io/hosting:latest
restart: always
container_name: hosting
# Needed only when using a FileSys Deployment
volumes:
# Same as workerserver. Read above for more information.
- stormkit:/shared
environment:
# Specifying this variable will tell the container to install Node.js
# which is needed only if you're using serverless functions or server
# commands in a VM. If you're hosting Stormkit in a cloud
# provider such as AWS or Alibaba Cloud, and you're using only serverless
# functionas, then you may not need installing Node.js as you can use their
# cloud-native serverless services (such as Lambda or Function Compute).
- NODE_VERSION=22
# See Workerserver configuration for these environment variables' documentation.
- STORMKIT_DOMAIN=${STORMKIT_DOMAIN}
- STORMKIT_APP_SECRET=${STORMKIT_APP_SECRET}
- STORMKIT_DEPLOYER_SERVICE=${STORMKIT_DEPLOYER_SERVICE:-local}
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- REDIS_ADDR=${REDIS_ADDR}
####################################################################################
# #
# Configure these variables when `STORMKIT_DEPLOYER_SERVICE` is other than `local` #
# #
####################################################################################
# When `STORMKIT_DEPLOYER_SERVICE` is `github`, this variable is needed to stop the GitHub Action.
- GITHUB_APP_TOKEN=${GITHUB_APP_TOKEN:-}
# The access and secret key used by the external runner.
- STORMKIT_RUNNER_SECRET_KEY=${STORMKIT_RUNNER_SECRET_KEY:-}
- STORMKIT_RUNNER_ACCESS_KEY=${STORMKIT_RUNNER_ACCESS_KEY:-}
##################################################################
# #
# Configure these variables when Authentication method is GitHub #
# #
##################################################################
# The account name
- GITHUB_APP_NAME=${GITHUB_APP_NAME:-}
# This is your GitHub App ID. This can be found under the General tab of your GitHub App page.
- GITHUB_APP_ID=${GITHUB_APP_ID:-}
# The client secret generated after creating the GitHub App.
- GITHUB_SECRET=${GITHUB_SECRET:-}
# The GitHub App client ID. This can be found under the General tab of your GitHub App page.
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID:-}
# The Base64 encoded private key generated previously after creating the GitHub App.
# You can use `openssl` to encode your string:
#
# cat my-key.pem | openssl base64 -A
#
# Make sure to enclose your variable with quotes.
- GITHUB_PRIV_KEY=${GITHUB_PRIV_KEY:-}
#########################################################################################
# #
# Configure these variables when Authentication method is BitBucket #
# See: https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/ #
# #
#########################################################################################
- BITBUCKET_SECRET=${BITBUCKET_SECRET:-}
- BITBUCKET_CLIENT_ID=${BITBUCKET_CLIENT_ID:-}
###################################################################
# #
# Configure these variables when Authentication method is GitLab #
# See: https://docs.gitlab.com/ee/integration/oauth_provider.html #
# #
###################################################################
- GITLAB_SECRET=${GITLAB_SECRET:-}
- GITLAB_CLIENT_ID=${GITLAB_CLIENT_ID:-}
ports:
- mode: ingress
target: 80
published: 80
protocol: tcp
- mode: ingress
target: 443
published: 443
protocol: tcp