Skip to content

Commit

Permalink
add new gh workflow push docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
IkeHunter committed Sep 8, 2024
1 parent cec5350 commit eb82031
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/push-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Push Docker Images
on:
pull_request:
branches:
- main

jobs:
push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker
run: |
echo "$DOCKER_PASS" | docker login $DOCKER_REGISTRY --username $DOCKER_USER --password-stdin
env:
DOCKER_PASS: ${{ secrets.DOCKER_REGISTRY_PASS }}
DOCKER_USER: ${{ secrets.DOCKER_REGISTRY_USER }}
DOCKER_REGISTRY: ${{ vars.DOCKER_REGISTRY }}
- name: Build and Push Images
run: |
docker buildx create --use
docker buildx build --platform=linux/amd64,linux/arm64 -t ikehunter5/jukebox-server:latest -f ./server/Dockerfile . --push
docker buildx build --platform=linux/amd64,linux/arm64 -t ikehunter5/jukebox-websocket:latest -f ./websocket/Dockerfile . --push
docker buildx build --platform=linux/amd64,linux/arm64 -t ikehunter5/jukebox-proxy:latest ./proxy --push
5 changes: 3 additions & 2 deletions docker-compose.network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ services:
server:
restart: always
build:
context: ./
dockerfile: ./server/Dockerfile
context: .
dockerfile: ./server.Dockerfile
# dockerfile: ./server/Dockerfile
container_name: server-jbx
environment:
- NODE_ENV=network
Expand Down
2 changes: 1 addition & 1 deletion proxy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN mkdir -p /vol/client && \

USER nginx

EXPOSE 80
EXPOSE 8080
VOLUME /vol/client

CMD ["/entrypoint.sh"]
2 changes: 1 addition & 1 deletion server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Development Image
# Server Image
################################################
FROM node:20-bookworm

Expand Down

0 comments on commit eb82031

Please sign in to comment.