Skip to content
Open
12 changes: 9 additions & 3 deletions .github/workflows/prod-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ on:
jobs:
deploy-prod:
name: Deploy to prod
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
environment: prod

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down Expand Up @@ -51,8 +51,14 @@ jobs:
ssh dokku@$DOKKU_HOST -C "dokku config:set --no-restart prod-stripe-connect-webhook-endpoint-router STRIPE_WEBHOOK_SECRET=${{ secrets.STRIPE_WEBHOOK_SECRET }}"
ssh dokku@$DOKKU_HOST -C "dokku config:set --no-restart prod-stripe-connect-webhook-endpoint-router STRIPE_WEBHOOK_PATH=${{ secrets.STRIPE_WEBHOOK_PATH }}"
ssh dokku@$DOKKU_HOST -C "dokku config:set --no-restart prod-stripe-connect-webhook-endpoint-router PYTHON_LOG_LEVEL=${{ secrets.PYTHON_LOG_LEVEL }}"
ssh dokku@$DOKKU_HOST -C "dokku ps:set-restart-policy prod-stripe-connect-webhook-endpoint-router unless-stopped"
ssh dokku@$DOKKU_HOST -C "dokku ps:set prod-stripe-connect-webhook-endpoint-router restart-policy unless-stopped"
ssh dokku@$DOKKU_HOST -C "dokku git:sync --build prod-stripe-connect-webhook-endpoint-router https://github.com/Subscribie/stripe-connect-webhook-endpoint-router.git main"
ssh dokku@$DOKKU_HOST -C "dokku ps:rebuild prod-stripe-connect-webhook-endpoint-router"
ssh dokku@$DOKKU_HOST -C "dokku config:set --no-restart prod-stripe-connect-webhook-endpoint-router DOKKU_LETSENCRYPT_EMAIL=${{ secrets.LETSENCRYPT_EMAIL }}"
ssh dokku@$DOKKU_HOST -C "dokku letsencrypt:enable prod-stripe-connect-webhook-endpoint-router" | true
ssh dokku@$DOKKU_HOST -C "dokku letsencrypt:cron-job --add"



- id: deploy
name: Deploy to dokku
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/testing-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ on:
jobs:
deploy-testing:
name: Deploy to testing
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
environment: testing

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down Expand Up @@ -53,8 +53,12 @@ jobs:
ssh dokku@$DOKKU_HOST -C "dokku config:set --no-restart testing-stripe-connect-webhook-endpoint-router STRIPE_WEBHOOK_SECRET=${{ secrets.STRIPE_WEBHOOK_SECRET }}"
ssh dokku@$DOKKU_HOST -C "dokku config:set --no-restart testing-stripe-connect-webhook-endpoint-router STRIPE_WEBHOOK_PATH=${{ secrets.STRIPE_WEBHOOK_PATH }}"
ssh dokku@$DOKKU_HOST -C "dokku config:set --no-restart testing-stripe-connect-webhook-endpoint-router PYTHON_LOG_LEVEL=${{ secrets.PYTHON_LOG_LEVEL }}"
ssh dokku@$DOKKU_HOST -C "dokku ps:set-restart-policy testing-stripe-connect-webhook-endpoint-router unless-stopped"
ssh dokku@$DOKKU_HOST -C "dokku ps:set testing-stripe-connect-webhook-endpoint-router restart-policy unless-stopped"
ssh dokku@$DOKKU_HOST -C "dokku git:sync --build testing-stripe-connect-webhook-endpoint-router https://github.com/Subscribie/stripe-connect-webhook-endpoint-router.git main"
ssh dokku@$DOKKU_HOST -C "dokku ps:rebuild testing-stripe-connect-webhook-endpoint-router"
ssh dokku@$DOKKU_HOST -C "dokku config:set --no-restart testing-stripe-connect-webhook-endpoint-router DOKKU_LETSENCRYPT_EMAIL=${{ secrets.LETSENCRYPT_EMAIL }}"
ssh dokku@$DOKKU_HOST -C "dokku letsencrypt:enable testing-stripe-connect-webhook-endpoint-router" | true
ssh dokku@$DOKKU_HOST -C "dokku letsencrypt:cron-job --add"

- id: deploy
name: Deploy to dokku
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ FROM python:3.6.8-alpine3.9
WORKDIR /usr/src/app
RUN apk add --update --no-cache build-base libffi-dev openssl-dev bash gcc
COPY . /usr/src/app/
RUN export DOCKER_BUILDKIT=1
RUN --mount=type=cache,target=/root/.cache/pip pip install -r requirements.txt
RUN --mount=type=cache,target=/root/.cache/pip pip install uWSGI==2.0.19.1
EXPOSE 80
Expand Down