2020-04-13 15:07:04 +02:00
|
|
|
{
|
|
|
|
local env = std.extVar("env"),
|
2021-04-29 14:44:41 +02:00
|
|
|
local namespace = env.DEPLOY_REF,
|
2020-05-03 18:51:25 +02:00
|
|
|
local tag = namespace,
|
2021-05-10 12:40:12 +02:00
|
|
|
local url = namespace+".test.workadventu.re",
|
2021-01-28 23:18:12 +01:00
|
|
|
// develop branch does not use admin because of issue with SSL certificate of admin as of now.
|
2022-02-17 15:04:51 +01:00
|
|
|
local adminUrl = if std.objectHas(env, 'ADMIN_API_URL') then env.ADMIN_API_URL else null,
|
2020-04-13 15:07:04 +02:00
|
|
|
"$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json",
|
2020-06-25 12:07:43 +02:00
|
|
|
"version": "1.0",
|
2020-04-13 15:07:04 +02:00
|
|
|
"containers": {
|
2020-12-14 22:44:02 +01:00
|
|
|
"back1": {
|
2020-04-13 15:44:33 +02:00
|
|
|
"image": "thecodingmachine/workadventure-back:"+tag,
|
2020-04-22 12:31:17 +02:00
|
|
|
"host": {
|
2021-06-11 14:25:02 +02:00
|
|
|
"url": "api1-"+url,
|
2020-12-09 17:45:05 +01:00
|
|
|
"containerPort": 8080
|
2020-04-22 12:31:17 +02:00
|
|
|
},
|
2020-12-09 17:25:10 +01:00
|
|
|
"ports": [8080, 50051],
|
2020-04-13 15:07:04 +02:00
|
|
|
"env": {
|
2020-10-14 12:00:23 +02:00
|
|
|
"SECRET_KEY": "tempSecretKeyNeedsToChange",
|
2020-10-19 12:07:05 +02:00
|
|
|
"JITSI_ISS": env.JITSI_ISS,
|
|
|
|
"JITSI_URL": env.JITSI_URL,
|
|
|
|
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
2021-02-16 09:58:08 +01:00
|
|
|
"TURN_STATIC_AUTH_SECRET": env.TURN_STATIC_AUTH_SECRET,
|
2021-07-19 15:57:50 +02:00
|
|
|
"REDIS_HOST": "redis",
|
2021-03-09 09:12:55 +01:00
|
|
|
} + (if adminUrl != null then {
|
2020-11-05 11:58:33 +01:00
|
|
|
"ADMIN_API_URL": adminUrl,
|
2021-09-30 11:39:35 +02:00
|
|
|
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
|
2021-05-10 12:40:12 +02:00
|
|
|
} else {})
|
2020-04-13 15:07:04 +02:00
|
|
|
},
|
2020-12-14 22:44:02 +01:00
|
|
|
"back2": {
|
|
|
|
"image": "thecodingmachine/workadventure-back:"+tag,
|
|
|
|
"host": {
|
2021-06-11 14:25:02 +02:00
|
|
|
"url": "api2-"+url,
|
2020-12-14 22:44:02 +01:00
|
|
|
"containerPort": 8080
|
|
|
|
},
|
|
|
|
"ports": [8080, 50051],
|
|
|
|
"env": {
|
|
|
|
"SECRET_KEY": "tempSecretKeyNeedsToChange",
|
|
|
|
"JITSI_ISS": env.JITSI_ISS,
|
|
|
|
"JITSI_URL": env.JITSI_URL,
|
|
|
|
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
2021-02-16 09:58:08 +01:00
|
|
|
"TURN_STATIC_AUTH_SECRET": env.TURN_STATIC_AUTH_SECRET,
|
2021-07-19 15:57:50 +02:00
|
|
|
"REDIS_HOST": "redis",
|
2021-03-09 09:12:55 +01:00
|
|
|
} + (if adminUrl != null then {
|
2020-12-14 22:44:02 +01:00
|
|
|
"ADMIN_API_URL": adminUrl,
|
2021-09-30 11:39:35 +02:00
|
|
|
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
|
2021-05-10 12:40:12 +02:00
|
|
|
} else {})
|
2020-12-14 22:44:02 +01:00
|
|
|
},
|
2020-12-04 15:13:35 +01:00
|
|
|
"pusher": {
|
2020-12-09 17:54:37 +01:00
|
|
|
"replicas": 2,
|
2020-12-04 15:13:35 +01:00
|
|
|
"image": "thecodingmachine/workadventure-pusher:"+tag,
|
|
|
|
"host": {
|
2021-06-11 14:25:02 +02:00
|
|
|
"url": "pusher-"+url,
|
2020-12-04 15:13:35 +01:00
|
|
|
},
|
|
|
|
"ports": [8080],
|
|
|
|
"env": {
|
|
|
|
"SECRET_KEY": "tempSecretKeyNeedsToChange",
|
|
|
|
"JITSI_ISS": env.JITSI_ISS,
|
|
|
|
"JITSI_URL": env.JITSI_URL,
|
2020-12-14 22:44:02 +01:00
|
|
|
"API_URL": "back1:50051,back2:50051",
|
2020-12-04 15:13:35 +01:00
|
|
|
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
2021-11-24 22:47:28 +01:00
|
|
|
"FRONT_URL": "https://play-"+url
|
2021-03-09 09:12:55 +01:00
|
|
|
} + (if adminUrl != null then {
|
2020-12-04 15:13:35 +01:00
|
|
|
"ADMIN_API_URL": adminUrl,
|
2021-09-30 11:39:35 +02:00
|
|
|
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
|
2021-10-26 14:58:34 +02:00
|
|
|
"ADMIN_SOCKETS_TOKEN": env.ADMIN_SOCKETS_TOKEN,
|
2022-04-12 11:44:22 +02:00
|
|
|
"OPID_CLIENT_ID": "auth-code-client",
|
|
|
|
"OPID_CLIENT_SECRET": "mySecretHydraWA2022",
|
|
|
|
"OPID_CLIENT_ISSUER": "https://publichydra-"+url,
|
|
|
|
"OPID_CLIENT_REDIRECT_URL": "https://"+url+"/oauth/hydra",
|
|
|
|
"OPID_LOGIN_SCREEN_PROVIDER": "https://pusher-"+url+"/login-screen",
|
2021-05-10 12:40:12 +02:00
|
|
|
} else {})
|
2020-12-04 15:13:35 +01:00
|
|
|
},
|
2020-04-13 15:07:04 +02:00
|
|
|
"front": {
|
2020-04-13 15:44:33 +02:00
|
|
|
"image": "thecodingmachine/workadventure-front:"+tag,
|
2020-04-22 12:31:17 +02:00
|
|
|
"host": {
|
2021-06-11 14:25:02 +02:00
|
|
|
"url": "play-"+url,
|
2020-04-22 12:31:17 +02:00
|
|
|
},
|
2020-04-13 15:07:04 +02:00
|
|
|
"ports": [80],
|
|
|
|
"env": {
|
2021-06-11 14:25:02 +02:00
|
|
|
"PUSHER_URL": "//pusher-"+url,
|
|
|
|
"UPLOADER_URL": "//uploader-"+url,
|
2021-03-31 16:00:14 +02:00
|
|
|
"ADMIN_URL": "//"+url,
|
2020-10-19 12:07:05 +02:00
|
|
|
"JITSI_URL": env.JITSI_URL,
|
2021-09-15 11:50:25 +02:00
|
|
|
#POSTHOG
|
|
|
|
"POSTHOG_API_KEY": if namespace == "master" then env.POSTHOG_API_KEY else "",
|
|
|
|
"POSTHOG_URL": if namespace == "master" then env.POSTHOG_URL else "",
|
2020-10-19 12:07:05 +02:00
|
|
|
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
|
2020-08-28 17:30:33 +02:00
|
|
|
"TURN_SERVER": "turn:coturn.workadventu.re:443,turns:coturn.workadventu.re:443",
|
2021-01-20 16:57:30 +01:00
|
|
|
"JITSI_PRIVATE_MODE": if env.SECRET_JITSI_KEY != '' then "true" else "false",
|
2022-01-25 14:52:37 +01:00
|
|
|
"START_ROOM_URL": "/_/global/maps-"+url+"/starter/map.json",
|
|
|
|
"ICON_URL": "//icon-"+url,
|
2020-04-13 15:07:04 +02:00
|
|
|
}
|
2020-06-01 16:12:48 +02:00
|
|
|
},
|
2020-12-09 21:29:29 +01:00
|
|
|
"uploader": {
|
|
|
|
"image": "thecodingmachine/workadventure-uploader:"+tag,
|
|
|
|
"host": {
|
2021-06-11 14:25:02 +02:00
|
|
|
"url": "uploader-"+url,
|
2020-12-09 21:29:29 +01:00
|
|
|
"containerPort": 8080
|
|
|
|
},
|
|
|
|
"ports": [8080],
|
|
|
|
"env": {
|
|
|
|
}
|
|
|
|
},
|
2020-07-23 18:43:51 +02:00
|
|
|
"maps": {
|
|
|
|
"image": "thecodingmachine/workadventure-maps:"+tag,
|
|
|
|
"host": {
|
2021-06-11 14:25:02 +02:00
|
|
|
"url": "maps-"+url
|
2020-07-23 18:43:51 +02:00
|
|
|
},
|
2021-11-29 19:05:13 +01:00
|
|
|
"ports": [80],
|
|
|
|
"env": {
|
|
|
|
"FRONT_URL": "https://play-"+url
|
|
|
|
}
|
2020-07-23 18:43:51 +02:00
|
|
|
},
|
2021-07-19 15:57:50 +02:00
|
|
|
"redis": {
|
|
|
|
"image": "redis:6",
|
2021-08-16 14:33:53 +02:00
|
|
|
"ports": [6379]
|
2022-01-25 14:52:37 +01:00
|
|
|
},
|
|
|
|
"iconserver": {
|
|
|
|
"image": "matthiasluedtke/iconserver:v3.13.0",
|
|
|
|
"host": {
|
|
|
|
"url": "icon-"+url,
|
|
|
|
"containerPort": 8080,
|
|
|
|
},
|
|
|
|
"ports": [8080]
|
|
|
|
},
|
2020-04-22 19:16:04 +02:00
|
|
|
},
|
|
|
|
"config": {
|
2020-06-17 22:55:03 +02:00
|
|
|
k8sextension(k8sConf)::
|
|
|
|
k8sConf + {
|
2020-12-14 22:44:02 +01:00
|
|
|
back1+: {
|
|
|
|
deployment+: {
|
|
|
|
spec+: {
|
|
|
|
template+: {
|
|
|
|
metadata+: {
|
|
|
|
annotations+: {
|
|
|
|
"prometheus.io/port": "8080",
|
|
|
|
"prometheus.io/scrape": "true"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-06-11 14:25:02 +02:00
|
|
|
},
|
|
|
|
ingress+: {
|
|
|
|
spec+: {
|
|
|
|
tls+: [{
|
|
|
|
hosts: ["api1-"+url],
|
|
|
|
secretName: "certificate-tls"
|
|
|
|
}]
|
|
|
|
}
|
2020-12-14 22:44:02 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
back2+: {
|
|
|
|
deployment+: {
|
|
|
|
spec+: {
|
|
|
|
template+: {
|
|
|
|
metadata+: {
|
|
|
|
annotations+: {
|
|
|
|
"prometheus.io/port": "8080",
|
|
|
|
"prometheus.io/scrape": "true"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-06-11 14:37:43 +02:00
|
|
|
},
|
|
|
|
ingress+: {
|
|
|
|
spec+: {
|
|
|
|
tls+: [{
|
|
|
|
hosts: ["api2-"+url],
|
|
|
|
secretName: "certificate-tls"
|
|
|
|
}]
|
|
|
|
}
|
2020-12-14 22:44:02 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
pusher+: {
|
2020-06-17 22:55:03 +02:00
|
|
|
deployment+: {
|
|
|
|
spec+: {
|
|
|
|
template+: {
|
|
|
|
metadata+: {
|
|
|
|
annotations+: {
|
|
|
|
"prometheus.io/port": "8080",
|
|
|
|
"prometheus.io/scrape": "true"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-06-11 14:37:43 +02:00
|
|
|
},
|
|
|
|
ingress+: {
|
|
|
|
spec+: {
|
|
|
|
tls+: [{
|
|
|
|
hosts: ["pusher-"+url],
|
|
|
|
secretName: "certificate-tls"
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
front+: {
|
|
|
|
ingress+: {
|
|
|
|
spec+: {
|
|
|
|
tls+: [{
|
|
|
|
hosts: ["play-"+url],
|
|
|
|
secretName: "certificate-tls"
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
uploader+: {
|
|
|
|
ingress+: {
|
|
|
|
spec+: {
|
|
|
|
tls+: [{
|
|
|
|
hosts: ["uploader-"+url],
|
|
|
|
secretName: "certificate-tls"
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
maps+: {
|
|
|
|
ingress+: {
|
|
|
|
spec+: {
|
|
|
|
tls+: [{
|
|
|
|
hosts: ["maps-"+url],
|
|
|
|
secretName: "certificate-tls"
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-01-25 15:27:44 +01:00
|
|
|
iconserver+: {
|
2022-01-25 14:52:37 +01:00
|
|
|
ingress+: {
|
|
|
|
spec+: {
|
|
|
|
tls+: [{
|
|
|
|
hosts: ["icon-"+url],
|
|
|
|
secretName: "certificate-tls"
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2020-06-17 22:55:03 +02:00
|
|
|
}
|
2020-04-13 15:07:04 +02:00
|
|
|
}
|
|
|
|
}
|