mirror of
https://github.com/mentos1386/zdravko.git
synced 2024-11-22 07:43:33 +00:00
ci(deploy): trying to fix deploy
This commit is contained in:
parent
bf8cdc2032
commit
4ae3570e74
3 changed files with 20 additions and 13 deletions
|
@ -69,6 +69,10 @@ func main() {
|
||||||
|
|
||||||
for _, s := range servers {
|
for _, s := range servers {
|
||||||
srv := s
|
srv := s
|
||||||
|
if srv == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
println("Starting", srv.Name())
|
println("Starting", srv.Name())
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
|
@ -85,13 +89,15 @@ func main() {
|
||||||
go func() {
|
go func() {
|
||||||
for sig := range c {
|
for sig := range c {
|
||||||
log.Printf("Received signal: %v", sig)
|
log.Printf("Received signal: %v", sig)
|
||||||
for _, s := range servers {
|
for _, srv := range servers {
|
||||||
if s != nil {
|
if srv == nil {
|
||||||
println("Stopping", s.Name())
|
continue
|
||||||
err := s.Stop()
|
}
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("Unable to stop server %s: %v", s.Name(), err)
|
println("Stopping", srv.Name())
|
||||||
}
|
err := srv.Stop()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Unable to stop server %s: %v", srv.Name(), err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,10 +40,9 @@ primary_region = 'waw'
|
||||||
auto_start_machines = true
|
auto_start_machines = true
|
||||||
min_machines_running = 0
|
min_machines_running = 0
|
||||||
processes = ['server']
|
processes = ['server']
|
||||||
|
[[services.ports]]
|
||||||
[[services.ports]]
|
port = 7233
|
||||||
port = 7233
|
handlers = ['tls']
|
||||||
handlers = ['tls']
|
|
||||||
|
|
||||||
[[vm]]
|
[[vm]]
|
||||||
cpu_kind = 'shared'
|
cpu_kind = 'shared'
|
||||||
|
|
6
justfile
6
justfile
|
@ -3,11 +3,13 @@ set shell := ["devbox", "run"]
|
||||||
# Load dotenv
|
# Load dotenv
|
||||||
set dotenv-load
|
set dotenv-load
|
||||||
|
|
||||||
|
GIT_SHA := `git rev-parse --short HEAD`
|
||||||
|
DOCKER_IMAGE := "ghcr.io/mentos1386/zdravko:sha-"+GIT_SHA
|
||||||
STATIC_DIR := "./web/static"
|
STATIC_DIR := "./web/static"
|
||||||
|
|
||||||
# Build the application
|
# Build the application
|
||||||
build:
|
build:
|
||||||
docker build -f build/Dockerfile -t ghcr.io/mentos1386/zdravko:latest .
|
docker build -f build/Dockerfile -t {{DOCKER_IMAGE}} .
|
||||||
|
|
||||||
# Run full development environment
|
# Run full development environment
|
||||||
run:
|
run:
|
||||||
|
@ -20,7 +22,7 @@ run-zdravko:
|
||||||
|
|
||||||
# Deploy the application to fly.io
|
# Deploy the application to fly.io
|
||||||
deploy:
|
deploy:
|
||||||
fly deploy --ha=false -c deploy/fly.toml
|
fly deploy --ha=false --smoke-checks=false -c deploy/fly.toml -i {{DOCKER_IMAGE}}
|
||||||
|
|
||||||
# Start devbox shell
|
# Start devbox shell
|
||||||
shell:
|
shell:
|
||||||
|
|
Loading…
Reference in a new issue