Skip to content

update docker

update docker #4

Workflow file for this run

name: Build and Deploy App
on:
push:
branches:
- main
jobs:
build-project:
name: Build project
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create .env file
run: |
echo "AUTH_TRUST_HOST=TRUE" >> .env
- name: Build Docker image
run: |
docker build -t forzamods-dev .
- name: Deploy Docker container
if: success()
run: |
docker stop forzamods-dev || true
docker rm forzamods-dev || true
docker run -d -p 3271:3000 \
--name forzamods-dev \
--env-file .env \
--restart unless-stopped \
forzamods-dev
- name: Cleanup
run: |
rm .env