Skip to content

Commit c24ba72

Browse files
authored
Test deploy (#314)
2 parents bbffc5f + 9c9ea04 commit c24ba72

File tree

7 files changed

+39
-45
lines changed

7 files changed

+39
-45
lines changed

.github/workflows/deploy-staging.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,6 @@ jobs:
1313
- name: Checkout code
1414
uses: actions/checkout@v4
1515

16-
- name: Set up Docker Buildx
17-
uses: docker/setup-buildx-action@v3
18-
19-
- name: Login to Docker Hub
20-
uses: docker/login-action@v3
21-
with:
22-
username: ${{ secrets.DOCKERHUB_USERNAME }}
23-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
24-
25-
- name: Build and push Docker image
26-
uses: docker/build-push-action@v5
27-
with:
28-
context: .
29-
push: true
30-
tags: |
31-
skillrx/skillrx:${{ github.sha }}
32-
skillrx/skillrx:latest
33-
3416
- name: Set up Ruby
3517
uses: ruby/setup-ruby@v1
3618
with:
@@ -58,4 +40,4 @@ jobs:
5840
AZURE_STORAGE_ACCOUNT_NAME: ${{ secrets.STAGING_AZURE_STORAGE_ACCOUNT_NAME }}
5941
AZURE_STORAGE_ACCOUNT_KEY: ${{ secrets.STAGING_AZURE_STORAGE_ACCOUNT_KEY }}
6042
run: |
61-
bin/kamal deploy -d staging --skip-push
43+
bin/kamal deploy -d staging

.kamal/secrets.production

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Production secrets - these will be set as GitHub secrets
2+
KAMAL_REGISTRY_USERNAME=$KAMAL_REGISTRY_USERNAME
3+
KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
4+
DATABASE_URL=$DATABASE_URL
5+
SECRET_KEY_BASE=$SECRET_KEY_BASE
6+
RAILS_MASTER_KEY=$RAILS_MASTER_KEY
7+
AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
8+
AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
9+
AZURE_STORAGE_ACCOUNT_NAME=$AZURE_STORAGE_ACCOUNT_NAME
10+
AZURE_STORAGE_ACCOUNT_KEY=$AZURE_STORAGE_ACCOUNT_KEY

.kamal/secrets.staging

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Staging secrets - these will be set as GitHub secrets
2+
KAMAL_REGISTRY_USERNAME=$KAMAL_REGISTRY_USERNAME
3+
KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
4+
DATABASE_URL=$DATABASE_URL
5+
SECRET_KEY_BASE=$SECRET_KEY_BASE
6+
RAILS_MASTER_KEY=$RAILS_MASTER_KEY
7+
AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
8+
AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
9+
AZURE_STORAGE_ACCOUNT_NAME=$AZURE_STORAGE_ACCOUNT_NAME
10+
AZURE_STORAGE_ACCOUNT_KEY=$AZURE_STORAGE_ACCOUNT_KEY

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@ USER 1000:1000
7171
ENTRYPOINT ["/rails/bin/docker-entrypoint"]
7272

7373
# Start server via Thruster by default, this can be overwritten at runtime
74-
EXPOSE 80
75-
CMD ["./bin/thrust", "./bin/rails", "server"]
74+
EXPOSE 3000
75+
CMD ["./bin/thrust", "./bin/rails", "server", "-p", "3000"]

config/deploy.production.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
# Production deployment configuration
2-
service: skillrx-production
3-
4-
# Name of the container image.
5-
image: skillrx/skillrx
6-
72
# Deploy to production server (update with your production server IP)
83
servers:
94
web:
10-
- 3.233.202.191
5+
hosts:
6+
- skillrx.org
117

128
proxy:
139
ssl: true
14-
hosts:
15-
- skillrx.org
16-
- www.skillrx.org
10+
host: skillrx.org
11+
app_port: 3000
1712

1813
registry:
19-
username: KAMAL_REGISTRY_USERNAME
14+
username:
15+
- KAMAL_REGISTRY_USERNAME
2016
password:
2117
- KAMAL_REGISTRY_PASSWORD
2218

config/deploy.staging.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
# Staging deployment configuration
2-
service: skillrx-staging
3-
4-
# Name of the container image.
5-
image: skillrx/skillrx
6-
72
# Deploy to staging server
83
servers:
94
web:
10-
- 98.85.96.222
5+
hosts:
6+
- staging.skillrx.org
117

128
proxy:
9+
host: staging.skillrx.org
10+
app_port: 3000
1311
ssl: true
14-
hosts:
15-
- staging.skillrx.org
16-
- www.staging.skillrx.org
1712

1813
registry:
19-
username: KAMAL_REGISTRY_USERNAME
14+
username:
15+
- KAMAL_REGISTRY_USERNAME
2016
password:
2117
- KAMAL_REGISTRY_PASSWORD
2218

@@ -35,6 +31,7 @@ env:
3531
AWS_DEFAULT_REGION: us-east-1
3632
AWS_BUCKET_NAME: skillrx-staging
3733
AZURE_STORAGE_SHARE_NAME: skillrx-staging-env
34+
AZURE_MEDIA_FILES_SYNC_DISABLED: "true"
3835
AWS_ENDPOINT_URL: "" # Empty for real AWS
3936
LOCALSTACK_DEBUG: "0"
4037
S3_SKIP_SIGNATURE_VALIDATION: "0"

config/deploy.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Base deployment configuration
2-
service: skillrx
3-
41
# Name of the container image.
5-
image: skillrx/skillrx
2+
image: skillrx/skillrx
3+
service: skillrx-web
4+

0 commit comments

Comments
 (0)