Skip to content

Commit

Permalink
Test environment deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Mihálik committed Jun 11, 2024
1 parent c31da00 commit 525dc37
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: deploy
name: Deploy Test Environment

on: workflow_dispatch

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- 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
stack_file_name: deployment/compose-test.yaml
args: up --build --force-recreate --detach
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out branch code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node.js with Yarn cache
uses: actions/setup-node@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"files.associations": {
"compose-*.yaml": "dockercompose"
},
"git.branchProtection": [
"master"
],
Expand Down
8 changes: 0 additions & 8 deletions compose.yaml

This file was deleted.

4 changes: 3 additions & 1 deletion Dockerfile → deployment/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM node:18

ARG NEXT_PUBLIC_BE_PORT

WORKDIR /app

COPY . ./
COPY . /app

RUN yarn && yarn build

Expand Down
19 changes: 19 additions & 0 deletions deployment/compose-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: "3"

services:
webstrom-frontend:
build:
dockerfile: deployment/Dockerfile
context: ..
args:
- NEXT_PUBLIC_BE_PORT=8920

image: webstrom-test-frontend

environment:
- PORT=8922
- NEXT_PUBLIC_BE_PORT=8920

network_mode: host

restart: always

0 comments on commit 525dc37

Please sign in to comment.