1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-06-30 14:40:10 +02:00

chore: update docker configuration

This commit is contained in:
Elias Schneider 2022-10-10 17:59:02 +02:00
parent 02beb66910
commit 603d79c09d
3 changed files with 35 additions and 12 deletions

View File

@ -1,9 +1,10 @@
name: Docker Image CI
name: Create Docker Image for Backend
on:
workflow_dispatch:
push:
branches: main
paths:
- 'backend/**'
jobs:
build:
@ -11,15 +12,14 @@ jobs:
steps:
- name: checkout code
uses: actions/checkout@v2
- name: install buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: login to docker registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: build the image
run: |
docker buildx build --push \
--tag stonith404/pingvin-share:latest \
--tag stonith404/pingvin-share-backend:latest \
--platform linux/amd64,linux/arm64 .

View File

@ -0,0 +1,25 @@
name: Create Docker Image for Frontend
on:
push:
branches: main
paths:
- 'frontend/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: login to docker registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: build the image
run: |
docker buildx build --push \
--tag stonith404/pingvin-share-frontend:latest \
--platform linux/amd64,linux/arm64 .

View File

@ -10,7 +10,7 @@ services:
volumes:
- pingvin-share-db:/var/lib/postgresql/data
backend:
image: pingvin-share/backend
image: stonith404/pingvin-share-backend
restart: unless-stopped
environment:
- POSTGRES_USER=${DB_USER}
@ -21,8 +21,6 @@ services:
- ALLOW_REGISTRATION=${ALLOW_REGISTRATION}
- MAX_FILE_SIZE=${MAX_FILE_SIZE}
- JWT_SECRET=${JWT_SECRET}
ports:
- '8080:8080'
depends_on:
- db
volumes:
@ -31,7 +29,7 @@ services:
restart: unless-stopped
ports:
- '3000:3000'
image: pingvin-share/frontend
image: stonith404/pingvin-share-frontend
environment:
- SHOW_HOME_PAGE=${SHOW_HOME_PAGE}
- ALLOW_REGISTRATION=${ALLOW_REGISTRATION}