Skip to content

Commit

Permalink
feat: docker support
Browse files Browse the repository at this point in the history
  • Loading branch information
Deivu committed Jul 27, 2024
1 parent ea473f1 commit 5714226
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Docker Image CI

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Login to Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ghcr.io/shipgirlproject/formidable:${{ github.sha }},ghcr.io/shipgirlproject/formidable:latest
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:lts-alpine

LABEL org.opencontainers.image.source = "https://github.com/shipgirlproject/Formidable"

RUN addgroup -g 900 formidable && \
adduser -S -u 900 -G formidable formidable

WORKDIR /home/formidable

COPY . /home/formidable

RUN mkdir -p /home/formidable && \
chown -R formidable:formidable /home/formidable

USER formidable

RUN npm install

ENTRYPOINT ["npm", "run", "dev"]

0 comments on commit 5714226

Please sign in to comment.