Add deploy stage
This commit is contained in:
parent
500ce9ceba
commit
eb27abbaae
|
@ -2,9 +2,13 @@ variables:
|
|||
REPO_NAME: codeberg.org/video-prize-ranch/rimgo
|
||||
DOCKER_HOST: tcp://docker:2375
|
||||
|
||||
build:
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
docker:
|
||||
image: docker:20
|
||||
stage: deploy
|
||||
stage: build
|
||||
services:
|
||||
- name: docker:20-dind
|
||||
command: ["--experimental"]
|
||||
|
@ -18,4 +22,14 @@ build:
|
|||
- docker context create mybuilder
|
||||
- docker buildx create --use --name mybuilder mybuilder
|
||||
- docker pull $CI_REGISTRY_IMAGE:latest || true
|
||||
- docker buildx build --cache-from $CI_REGISTRY_IMAGE:latest --platform linux/amd64,linux/arm64 --push -t $CI_REGISTRY_IMAGE:latest .
|
||||
- docker buildx build --cache-from $CI_REGISTRY_IMAGE:latest --platform linux/amd64,linux/arm64 --push -t $CI_REGISTRY_IMAGE:latest .
|
||||
|
||||
deploy:
|
||||
image: alpine:latest
|
||||
stage: deploy
|
||||
needs: []
|
||||
before_script:
|
||||
- apk update && apk --no-cache add curl
|
||||
- wget -O - https://fly.io/install.sh | sh
|
||||
script:
|
||||
- /root/.fly/bin/flyctl deploy --no-cache --detach
|
|
@ -0,0 +1,40 @@
|
|||
# fly.toml file generated for autumn-star-1901 on 2022-05-02T21:08:36-04:00
|
||||
|
||||
app = "autumn-star-1901"
|
||||
|
||||
kill_signal = "SIGINT"
|
||||
kill_timeout = 5
|
||||
processes = []
|
||||
|
||||
[env]
|
||||
|
||||
[experimental]
|
||||
allowed_public_ports = []
|
||||
auto_rollback = true
|
||||
|
||||
[[services]]
|
||||
http_checks = []
|
||||
internal_port = 3000
|
||||
processes = ["app"]
|
||||
protocol = "tcp"
|
||||
script_checks = []
|
||||
|
||||
[services.concurrency]
|
||||
hard_limit = 25
|
||||
soft_limit = 20
|
||||
type = "connections"
|
||||
|
||||
[[services.ports]]
|
||||
force_https = true
|
||||
handlers = ["http"]
|
||||
port = 80
|
||||
|
||||
[[services.ports]]
|
||||
handlers = ["tls", "http"]
|
||||
port = 443
|
||||
|
||||
[[services.tcp_checks]]
|
||||
grace_period = "1s"
|
||||
interval = "15s"
|
||||
restart_limit = 0
|
||||
timeout = "2s"
|
Loading…
Reference in New Issue