Skip to content

Commit b0faad7

Browse files
committed
Update deploy.yml
1 parent 0d1a846 commit b0faad7

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

.kamal/secrets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
77
KAMAL_REGISTRY_USERNAME=$KAMAL_REGISTRY_USERNAME
88
SERVICESTACK_LICENSE=$SERVICESTACK_LICENSE
9+
APPSETTINGS_JSON_BASE64=$APPSETTINGS_JSON_BASE64
910

1011
# Option 2: Read secrets via a command
1112
# RAILS_MASTER_KEY=$(cat config/master.key)

config/deploy.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1+
# <% require "dotenv"; Dotenv.load(".env") %>
12
# Kamal deploy config for this repository. Uses environment variables:
2-
# - GITHUB_REPOSITORY (e.g. acme/example.org) - from GitHub Action ${github.repository}
3-
# - KAMAL_REGISTRY_USERNAME (e.g. my-user) - from GitHub Action ${github.actor}
4-
# - KAMAL_REGISTRY_PASSWORD ($GITHUB_TOKEN) - from GitHub Action ${secrets.GITHUB_TOKEN}
5-
# - KAMAL_DEPLOY_IP (e.g. 100.100.100.100) - from GitHub Action Secret
6-
# - KAMAL_DEPLOY_HOST (e.g. example.org) - from GitHub Action Secret
7-
# - POSTGRES_PASSWORD (e.g. random-password) - from GitHub Action Secret
8-
3+
# - GITHUB_REPOSITORY (e.g. acme/example.org) - from GitHub Action ${github.repository}
4+
# SERVICE (e.g. example-org)
5+
# IMAGE (e.g. ghcr.io/acme/example.org)
6+
# - KAMAL_REGISTRY_USERNAME (e.g. my-user) - from GitHub Action ${github.actor}
7+
# - KAMAL_REGISTRY_PASSWORD ($GITHUB_TOKEN) - from GitHub Action ${secrets.GITHUB_TOKEN}
8+
# - KAMAL_DEPLOY_IP (e.g. 100.100.100.100) - from GitHub Action Secret
9+
# - KAMAL_DEPLOY_HOST (e.g. example.org) - from GitHub Action Secret
10+
# - POSTGRES_PASSWORD (e.g. random-password) - from GitHub Action Secret
11+
#
912
# Using environment variables keeps this configuration reusable across multiple apps.
10-
# For a simpler, app-specific setup, you can replace them with hard-coded values.
13+
# For a simpler app-specific setup (without needing .env), they can be replaced with hard-coded values.
1114

1215
# Name of your application. Used to uniquely configure containers. (e.g. example-org)
13-
service: <%= ENV['GITHUB_REPOSITORY'].to_s.split('/').last.tr('.', '-') %>
16+
service: <%= ENV['SERVICE'] %>
1417

15-
# Name of the container image. (e.g. ghcr.io/acne/example.org)
16-
image: ghcr.io/<%= ENV['GITHUB_REPOSITORY'].to_s.downcase %>
18+
# Name of the container image. (e.g. ghcr.io/acme/example.org)
19+
image: <%= ENV['IMAGE'] %>
1720

1821
# Required for use of ASP.NET Core with Kamal-Proxy.
1922
env:
@@ -22,6 +25,7 @@ env:
2225
# secrets from ./kamal/secrets
2326
secret:
2427
- SERVICESTACK_LICENSE
28+
- APPSETTINGS_JSON_BASE64
2529

2630
# Deploy to these servers.
2731
servers:
@@ -56,7 +60,7 @@ builder:
5660
arch: amd64
5761

5862
volumes:
59-
- "/opt/docker/<%= ENV['GITHUB_REPOSITORY'].to_s.split('/').last %>/App_Data:/app/App_Data"
63+
- "/opt/docker/<%= ENV['SERVICE'] %>/App_Data:/app/App_Data"
6064

6165
#accessories:
6266
# litestream:

0 commit comments

Comments
 (0)