2020-04-13 15:07:04 +02:00
|
|
|
{
|
|
|
|
local env = std.extVar("env"),
|
2020-04-13 15:44:33 +02:00
|
|
|
local namespace = env.GITHUB_REF_SLUG,
|
2020-05-03 18:51:25 +02:00
|
|
|
local tag = namespace,
|
2020-05-13 16:17:58 +02:00
|
|
|
local url = if namespace == "master" then "workadventu.re" else namespace+".workadventure.test.thecodingmachine.com",
|
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.
|
|
|
|
local adminUrl = if namespace == "master" /*|| namespace == "develop"*/ || std.startsWith(namespace, "admin") then "https://"+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": {
|
2020-12-14 22:44:02 +01:00
|
|
|
"url": "api1."+url,
|
2020-12-09 17:37:52 +01:00
|
|
|
"https": "enable",
|
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",
|
|
|
|
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
|
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,
|
2020-11-05 11:58:33 +01:00
|
|
|
} + if adminUrl != null then {
|
|
|
|
"ADMIN_API_URL": adminUrl,
|
|
|
|
} else {}
|
2020-04-13 15:07:04 +02:00
|
|
|
},
|
2020-12-14 22:44:02 +01:00
|
|
|
"back2": {
|
|
|
|
"image": "thecodingmachine/workadventure-back:"+tag,
|
|
|
|
"host": {
|
|
|
|
"url": "api2."+url,
|
|
|
|
"https": "enable",
|
|
|
|
"containerPort": 8080
|
|
|
|
},
|
|
|
|
"ports": [8080, 50051],
|
|
|
|
"env": {
|
|
|
|
"SECRET_KEY": "tempSecretKeyNeedsToChange",
|
|
|
|
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
|
|
|
|
"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,
|
2020-12-14 22:44:02 +01:00
|
|
|
} + if adminUrl != null then {
|
|
|
|
"ADMIN_API_URL": adminUrl,
|
|
|
|
} else {}
|
|
|
|
},
|
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": {
|
|
|
|
"url": "pusher."+url,
|
|
|
|
"https": "enable"
|
|
|
|
},
|
|
|
|
"ports": [8080],
|
|
|
|
"env": {
|
|
|
|
"SECRET_KEY": "tempSecretKeyNeedsToChange",
|
|
|
|
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
|
|
|
|
"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,
|
|
|
|
} + if adminUrl != null then {
|
|
|
|
"ADMIN_API_URL": adminUrl,
|
|
|
|
} else {}
|
|
|
|
},
|
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": {
|
2020-06-01 16:12:48 +02:00
|
|
|
"url": "play."+url,
|
2020-04-22 19:16:04 +02:00
|
|
|
"https": "enable"
|
2020-04-22 12:31:17 +02:00
|
|
|
},
|
2020-04-13 15:07:04 +02:00
|
|
|
"ports": [80],
|
|
|
|
"env": {
|
2020-12-09 15:27:52 +01:00
|
|
|
"API_URL": "pusher."+url,
|
2020-12-09 21:29:29 +01:00
|
|
|
"UPLOADER_URL": "uploader."+url,
|
2021-01-20 10:34:26 +01:00
|
|
|
"ADMIN_URL": url,
|
2020-10-19 12:07:05 +02:00
|
|
|
"JITSI_URL": env.JITSI_URL,
|
|
|
|
"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",
|
2021-01-25 22:42:44 +01:00
|
|
|
"START_ROOM_URL": "/_/global/maps."+url+"/Floor0/floor0.json"
|
2021-01-20 17:30:26 +01:00
|
|
|
//"GA_TRACKING_ID": "UA-10196481-11"
|
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": {
|
|
|
|
"url": "uploader."+url,
|
|
|
|
"https": "enable",
|
|
|
|
"containerPort": 8080
|
|
|
|
},
|
|
|
|
"ports": [8080],
|
|
|
|
"env": {
|
|
|
|
}
|
|
|
|
},
|
2020-07-23 18:43:51 +02:00
|
|
|
"maps": {
|
|
|
|
"image": "thecodingmachine/workadventure-maps:"+tag,
|
|
|
|
"host": {
|
|
|
|
"url": "maps."+url,
|
|
|
|
"https": "enable"
|
|
|
|
},
|
|
|
|
"ports": [80]
|
|
|
|
},
|
2020-04-22 19:16:04 +02:00
|
|
|
},
|
|
|
|
"config": {
|
|
|
|
"https": {
|
|
|
|
"mail": "d.negrier@thecodingmachine.com"
|
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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
back2+: {
|
|
|
|
deployment+: {
|
|
|
|
spec+: {
|
|
|
|
template+: {
|
|
|
|
metadata+: {
|
|
|
|
annotations+: {
|
|
|
|
"prometheus.io/port": "8080",
|
|
|
|
"prometheus.io/scrape": "true"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
pusher+: {
|
2020-06-17 22:55:03 +02:00
|
|
|
deployment+: {
|
|
|
|
spec+: {
|
|
|
|
template+: {
|
|
|
|
metadata+: {
|
|
|
|
annotations+: {
|
|
|
|
"prometheus.io/port": "8080",
|
|
|
|
"prometheus.io/scrape": "true"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-04-13 15:07:04 +02:00
|
|
|
}
|
|
|
|
}
|