mirror of
https://github.com/mentos1386/zdravko.git
synced 2024-11-25 08:58:50 +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 {
|
||||
srv := s
|
||||
if srv == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
println("Starting", srv.Name())
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
|
@ -85,13 +89,15 @@ func main() {
|
|||
go func() {
|
||||
for sig := range c {
|
||||
log.Printf("Received signal: %v", sig)
|
||||
for _, s := range servers {
|
||||
if s != nil {
|
||||
println("Stopping", s.Name())
|
||||
err := s.Stop()
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to stop server %s: %v", s.Name(), err)
|
||||
}
|
||||
for _, srv := range servers {
|
||||
if srv == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
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
|
||||
min_machines_running = 0
|
||||
processes = ['server']
|
||||
|
||||
[[services.ports]]
|
||||
port = 7233
|
||||
handlers = ['tls']
|
||||
[[services.ports]]
|
||||
port = 7233
|
||||
handlers = ['tls']
|
||||
|
||||
[[vm]]
|
||||
cpu_kind = 'shared'
|
||||
|
|
6
justfile
6
justfile
|
@ -3,11 +3,13 @@ set shell := ["devbox", "run"]
|
|||
# Load dotenv
|
||||
set dotenv-load
|
||||
|
||||
GIT_SHA := `git rev-parse --short HEAD`
|
||||
DOCKER_IMAGE := "ghcr.io/mentos1386/zdravko:sha-"+GIT_SHA
|
||||
STATIC_DIR := "./web/static"
|
||||
|
||||
# Build the application
|
||||
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:
|
||||
|
@ -20,7 +22,7 @@ run-zdravko:
|
|||
|
||||
# Deploy the application to fly.io
|
||||
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
|
||||
shell:
|
||||
|
|
Loading…
Reference in a new issue