mirror of
https://github.com/mentos1386/zdravko.git
synced 2024-11-21 23:33:34 +00:00
feat: docker scratch image, move deploy to own justfile
This commit is contained in:
parent
4445db1c97
commit
a3ff067d72
4 changed files with 24 additions and 18 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM gcr.io/distroless/static-debian12:latest as production
|
FROM scratch
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
ARG TARGETOS
|
ARG TARGETOS
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,3 @@
|
||||||
# Deploy the application to fly.io
|
|
||||||
deploy-fly:
|
|
||||||
fly deploy --ha=false -c deploy/fly.toml -i {{DOCKER_IMAGE}}
|
|
||||||
|
|
||||||
# Read local jwt key and set it as fly secret
|
|
||||||
deploy-fly-set-jwt-key-secrets:
|
|
||||||
#!/bin/bash
|
|
||||||
# https://github.com/superfly/flyctl/issues/589
|
|
||||||
cat <<EOF | fly secrets import -c deploy/fly.toml
|
|
||||||
JWT_PRIVATE_KEY="""{{JWT_PRIVATE_KEY}}"""
|
|
||||||
JWT_PUBLIC_KEY="""{{JWT_PUBLIC_KEY}}"""
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Deploy locally with docker compose
|
|
||||||
deploy-docker: build-docker
|
|
||||||
docker compose --file dpeloy/docker-compose.yaml up
|
|
||||||
|
|
||||||
# Build the application
|
# Build the application
|
||||||
build: build-bin build-docker
|
build: build-bin build-docker
|
||||||
|
|
||||||
|
|
16
deploy/Justfile
Normal file
16
deploy/Justfile
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Deploy the application to fly.io
|
||||||
|
deploy-fly:
|
||||||
|
fly deploy --ha=false -c deploy/fly.toml -i {{DOCKER_IMAGE}}
|
||||||
|
|
||||||
|
# Read local jwt key and set it as fly secret
|
||||||
|
deploy-fly-set-jwt-key-secrets:
|
||||||
|
#!/bin/bash
|
||||||
|
# https://github.com/superfly/flyctl/issues/589
|
||||||
|
cat <<EOF | fly secrets import -c deploy/fly.toml
|
||||||
|
JWT_PRIVATE_KEY="""{{JWT_PRIVATE_KEY}}"""
|
||||||
|
JWT_PUBLIC_KEY="""{{JWT_PUBLIC_KEY}}"""
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Deploy locally with docker compose
|
||||||
|
deploy-docker: build-docker
|
||||||
|
docker compose --file dpeloy/docker-compose.yaml up
|
7
justfile
7
justfile
|
@ -17,6 +17,7 @@ ARCH := "amd64 arm64"
|
||||||
|
|
||||||
export CGO_ENABLED := "0"
|
export CGO_ENABLED := "0"
|
||||||
import 'build/Justfile'
|
import 'build/Justfile'
|
||||||
|
import 'deploy/Justfile'
|
||||||
|
|
||||||
_default:
|
_default:
|
||||||
@just --list
|
@just --list
|
||||||
|
@ -86,6 +87,12 @@ migration-new name:
|
||||||
echo "Created migration file: $FILENAME"
|
echo "Created migration file: $FILENAME"
|
||||||
|
|
||||||
update-dependencies:
|
update-dependencies:
|
||||||
|
# Updating temporal dependencies is a bit tricky
|
||||||
|
# as finding the right combination of api, server and ui-server
|
||||||
|
# that work together is not easy.
|
||||||
|
# Any version of ui-server > 2.23.0 < 2.27.2 is broken for us.
|
||||||
|
# Using latest of everything results (at the time of writing) in to
|
||||||
|
# working server but broken ui-server (404 when it tries to list namespaces).
|
||||||
go get -u -t \
|
go get -u -t \
|
||||||
go.k6.io/k6@v0.51.0 \
|
go.k6.io/k6@v0.51.0 \
|
||||||
github.com/temporalio/ui-server/v2@v2.23.0 \
|
github.com/temporalio/ui-server/v2@v2.23.0 \
|
||||||
|
|
Loading…
Reference in a new issue