Skip to content

Commit 3c4a6c3

Browse files
committed
Use repository name
1 parent 4296813 commit 3c4a6c3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

config/deploy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ builder:
5656
arch: amd64
5757

5858
volumes:
59-
- "/opt/docker/<%= ENV['KAMAL_DEPLOY_HOST'] %>/App_Data:/app/App_Data"
59+
- "/opt/docker/<%= ENV['GITHUB_REPOSITORY'].to_s.split('/').last %>/App_Data:/app/App_Data"
6060

6161
accessories:
6262
postgres:
@@ -67,13 +67,13 @@ accessories:
6767
env:
6868
clear:
6969
# Database username and database name (e.g. example/example)
70-
POSTGRES_USER: <%= ENV['GITHUB_REPOSITORY'].to_s.split('/').last.tr('.', '-').split('-').first %>
71-
POSTGRES_DB: <%= ENV['GITHUB_REPOSITORY'].to_s.split('/').last.tr('.', '-').split('-').first %>
70+
POSTGRES_USER: <%= ENV['GITHUB_REPOSITORY'].to_s.split('/').last %>
71+
POSTGRES_DB: <%= ENV['GITHUB_REPOSITORY'].to_s.split('/').last %>
7272
# Optional: only listens inside container
7373
PGDATA: /var/lib/postgresql/data
7474
# secrets from ./kamal/secrets
7575
secret:
7676
- POSTGRES_PASSWORD
7777
directories:
78-
- /opt/docker/<%= ENV['KAMAL_DEPLOY_HOST'] %>/postgres:/var/lib/postgresql/data
79-
- /opt/docker/<%= ENV['KAMAL_DEPLOY_HOST'] %>/initdb.d:/docker-entrypoint-initdb.d
78+
- /opt/docker/<%= ENV['GITHUB_REPOSITORY'].to_s.split('/').last %>/postgres:/var/lib/postgresql/data
79+
- /opt/docker/<%= ENV['GITHUB_REPOSITORY'].to_s.split('/').last %>/initdb.d:/docker-entrypoint-initdb.d

0 commit comments

Comments
 (0)