Add deploy stage

This commit is contained in:
video-prize-ranch 2022-05-14 11:47:28 -04:00
parent 500ce9ceba
commit eb27abbaae
No known key found for this signature in database
GPG Key ID: D8EAA4C5B12A7281
2 changed files with 57 additions and 3 deletions

View File

@ -2,9 +2,13 @@ variables:
REPO_NAME: codeberg.org/video-prize-ranch/rimgo REPO_NAME: codeberg.org/video-prize-ranch/rimgo
DOCKER_HOST: tcp://docker:2375 DOCKER_HOST: tcp://docker:2375
build: stages:
- build
- deploy
docker:
image: docker:20 image: docker:20
stage: deploy stage: build
services: services:
- name: docker:20-dind - name: docker:20-dind
command: ["--experimental"] command: ["--experimental"]
@ -19,3 +23,13 @@ build:
- docker buildx create --use --name mybuilder mybuilder - docker buildx create --use --name mybuilder mybuilder
- docker pull $CI_REGISTRY_IMAGE:latest || true - 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

40
fly.toml Normal file
View File

@ -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"