partey_workadventure/deeployer.libsonnet

70 lines
1.8 KiB
Plaintext
Raw Normal View History

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",
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": {
"back": {
2020-04-13 15:44:33 +02:00
"image": "thecodingmachine/workadventure-back:"+tag,
2020-04-22 12:31:17 +02:00
"host": {
"url": "api."+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": [8080],
"env": {
"SECRET_KEY": "tempSecretKeyNeedsToChange"
}
},
"front": {
2020-04-13 15:44:33 +02:00
"image": "thecodingmachine/workadventure-front:"+tag,
2020-04-22 12:31:17 +02:00
"host": {
"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-08-31 12:18:00 +02:00
"API_URL": "api."+url,
2020-08-28 13:52:25 +02:00
"JITSI_URL": "meet.jit.si",
2020-08-28 17:30:33 +02:00
"TURN_SERVER": "turn:coturn.workadventu.re:443,turns:coturn.workadventu.re:443",
2020-08-28 13:52:25 +02:00
"TURN_USER": "workadventure",
"TURN_PASSWORD": "WorkAdventure123"
2020-04-13 15:07:04 +02:00
}
},
"website": {
"image": "thecodingmachine/workadventure-website:"+tag,
"host": {
"url": url,
"https": "enable"
},
"ports": [80],
"env": {
"GAME_URL": "https://play."+url
}
2020-04-13 15:07:04 +02:00
}
2020-04-22 19:16:04 +02:00
},
"config": {
"https": {
"mail": "d.negrier@thecodingmachine.com"
},
k8sextension(k8sConf)::
k8sConf + {
back+: {
deployment+: {
spec+: {
template+: {
metadata+: {
annotations+: {
"prometheus.io/port": "8080",
"prometheus.io/scrape": "true"
}
}
}
}
}
}
}
2020-04-13 15:07:04 +02:00
}
}