Skip to content

Commit

Permalink
task: moving to kamal 2
Browse files Browse the repository at this point in the history
  • Loading branch information
paganotoni committed Sep 26, 2024
1 parent 3003f9f commit b846284
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
ruby-version: 3.3.0
bundler-cache: true
- run: gem install kamal -v 1.8.3
- run: gem install kamal -v 2.0.0
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
Expand Down
2 changes: 2 additions & 0 deletions .kamal/secrets
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SESSION_SECRET=$SESSION_SECRET
KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
39 changes: 10 additions & 29 deletions config/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@ service: todox
image: paganotoni/todox
servers:
web:
hosts:
- <%= ENV['PRODUCTION_SERVER_IP'] %>
options:
"add-host": host.docker.internal:host-gateway
labels:
traefik.http.services.todox-web.loadbalancer.server.port: 3000
traefik.http.routers.todox.rule: "Host(`todox.antoniopagano.com`)"
traefik.http.routers.todox_secure.rule: "Host(`todox.antoniopagano.com`)"
traefik.http.routers.todox_secure.entrypoints: websecure
traefik.http.routers.todox_secure.tls: true
traefik.http.routers.todox_secure.tls.certresolver: letsencrypt
- <%= ENV['PRODUCTION_SERVER_IP'] %>

volumes:
- /data/todox:/data/todox
Expand All @@ -25,30 +15,21 @@ registry:

env:
clear:
HOST: 0.0.0.0
GO_ENV: production
DATABASE_URL: /data/todox/database.db
secret:
- SESSION_SECRET

healthcheck:
cmd: wget -qO- http://localhost:3000/health
max_attempts: 2
traefik:
options:
publish:
- "443:443"
volume:
- "/letsencrypt/acme.json:/letsencrypt/acme.json"
args:
entryPoints.web.address: ":80"
entryPoints.websecure.address: ":443"
certificatesResolvers.letsencrypt.acme.email: "[email protected]"
certificatesResolvers.letsencrypt.acme.storage: "/letsencrypt/acme.json"
certificatesResolvers.letsencrypt.acme.httpchallenge: true
certificatesResolvers.letsencrypt.acme.httpchallenge.entrypoint: web
proxy:
host: todox.antoniopagano.com
ssl: true
app_port: 3000
healthcheck:
interval: 2
timeout: 2
path: /health

builder:
multiarch: false
arch: amd64
cache:
type: gha

0 comments on commit b846284

Please sign in to comment.