Deploying one environment per branch
This commit is contained in:
parent
1c833f6114
commit
b5901b253a
@ -1,21 +0,0 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json",
|
||||
"containers": {
|
||||
"back": {
|
||||
"image": "thecodingmachine/workadventure-back:cd",
|
||||
"host": "api.workadventure.test.thecodingmachine.com",
|
||||
"ports": [8080],
|
||||
"env": {
|
||||
"SECRET_KEY": "tempSecretKeyNeedsToChange"
|
||||
}
|
||||
},
|
||||
"front": {
|
||||
"image": "thecodingmachine/workadventure-front:cd",
|
||||
"host": "workadventure.test.thecodingmachine.com",
|
||||
"ports": [80],
|
||||
"env": {
|
||||
"API_URL": "http://api.workadventure.test.thecodingmachine.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
24
deeployer.libsonnet
Normal file
24
deeployer.libsonnet
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
local env = std.extVar("env"),
|
||||
# FIXME: namespace does not work if the branch contains a "/"
|
||||
local namespace = std.split(env.GITHUB_REF, "/")[2]
|
||||
"$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json",
|
||||
"containers": {
|
||||
"back": {
|
||||
"image": "thecodingmachine/workadventure-back:"+namespace,
|
||||
"host": "api."+namespace+".workadventure.test.thecodingmachine.com",
|
||||
"ports": [8080],
|
||||
"env": {
|
||||
"SECRET_KEY": "tempSecretKeyNeedsToChange"
|
||||
}
|
||||
},
|
||||
"front": {
|
||||
"image": "thecodingmachine/workadventure-front:"+namespace,
|
||||
"host": namespace+".workadventure.test.thecodingmachine.com",
|
||||
"ports": [80],
|
||||
"env": {
|
||||
"API_URL": "http://api."+namespace+".workadventure.test.thecodingmachine.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user