Skip to content

Commit

Permalink
ci: change deployment and add docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandro Marton committed Mar 28, 2024
1 parent 04eb5e0 commit f0d7d12
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 6 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/deploy-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,24 @@ on:

jobs:

build:

deploy-compose:
steps:
- name: Deploy docker compose
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-rlgoDzvc -i"
SOURCE: "deploy/app/docker-compose.yml"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: "/var/data/services/test.gallowhead.com/"
EXCLUDE: "/dist/, /node_modules/"
SCRIPT_BEFORE: |
echo "Starting deployment ..."
if [ ! -d /var/data/services/test-gallowhead]; then mkdir /var/data/services/test-gallowhead
start-container:
name: Build
runs-on: ubuntu-latest
steps:
Expand All @@ -20,4 +37,4 @@ jobs:
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.PORT }}
script: docker pull
script: cd /var/data/services/test-gallowhead && docker compose up --build -d
6 changes: 3 additions & 3 deletions .github/workflows/deploy-nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ workflow_dispatch:
environment:
description: 'Environment to run tests against'
type: environment
required: true
required: false

jobs:

deploy-nginx:

steps:
- name: Deploy Nginx
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-rlgoDzvc -i"
SOURCE: "webserver/proxy/test.gallowhead.com.conf"
SOURCE: "deploy/webserver/proxy/test.gallowhead.com.conf"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: "/etc/nginx/sites-enabled/"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-image-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}:latest
IMAGE_NAME: ${{ github.repository }}

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
Expand Down
10 changes: 10 additions & 0 deletions deploy/app/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: '3'

services:
gallowhead:
image: ghcr.io/muchasxmaracas/gallowhead:main
restart: always
#healthcheck:
# test: curl -I
# interval: 5s
# retries: 5
File renamed without changes.
File renamed without changes.

0 comments on commit f0d7d12

Please sign in to comment.