From eb82031ec7ace3c1521d918edd5b00c28ab2f90e Mon Sep 17 00:00:00 2001 From: Isaac Hunter Date: Sun, 8 Sep 2024 17:50:55 -0400 Subject: [PATCH] add new gh workflow push docker images --- .github/workflows/push-docker.yml | 25 +++++++++++++++++++++++++ docker-compose.network.yml | 5 +++-- proxy/Dockerfile | 2 +- server/Dockerfile | 2 +- 4 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/push-docker.yml diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml new file mode 100644 index 0000000..03cac8a --- /dev/null +++ b/.github/workflows/push-docker.yml @@ -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 \ No newline at end of file diff --git a/docker-compose.network.yml b/docker-compose.network.yml index ba43609..c937bb7 100644 --- a/docker-compose.network.yml +++ b/docker-compose.network.yml @@ -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 diff --git a/proxy/Dockerfile b/proxy/Dockerfile index 004f23a..5ab0115 100644 --- a/proxy/Dockerfile +++ b/proxy/Dockerfile @@ -15,7 +15,7 @@ RUN mkdir -p /vol/client && \ USER nginx -EXPOSE 80 +EXPOSE 8080 VOLUME /vol/client CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/server/Dockerfile b/server/Dockerfile index 78021dc..182f011 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,4 +1,4 @@ -# Development Image +# Server Image ################################################ FROM node:20-bookworm