Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Compose #157

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
name: deploy

on:
workflow_dispatch:
on: workflow_dispatch

jobs:
deploy:
name: "Deploy"
runs-on: ubuntu-latest
steps:
- name: Temporarily save SSH key to file
run: |
echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploy_key
chmod 600 deploy_key
- name: Run deployment via SSH
run: ssh -o "StrictHostKeyChecking=no" -i deploy_key [email protected] deploy-frontend

- name: Clean SSH key
run: rm -f deploy_key
- uses: actions/checkout@v3
- uses: wshihadeh/docker-deployment-action@v2
with:
remote_docker_host: [email protected]
ssh_private_key: ${{ secrets.WEBSTROM_DEPLOY_SSH_PRIVATE_KEY }}
ssh_public_key: ${{ secrets.WEBSTROM_DEPLOY_SSH_PUBLIC_KEY }}
stack_file_name: compose.yaml
args: up --build --force-recreate --detach
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:18

WORKDIR /app

COPY . ./

RUN yarn && yarn build

ENTRYPOINT [ "yarn", "start", "-H", "localhost" ]
8 changes: 8 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: "3"

services:
frontend:
build: .
image: webstrom-frontend
network_mode: "host"
restart: always
Loading