Skip to content

Commit

Permalink
feat(docker): autobuild
Browse files Browse the repository at this point in the history
  • Loading branch information
esoadamo committed Nov 12, 2024
1 parent 6e44c88 commit 896e887
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Docker Compose Build and Push

on:
push:
branches:
- main
- master

jobs:
build_and_push:
runs-on: ubuntu-latest

steps:
- name: Check out the repository, including submodules
uses: actions/checkout@v3
with:
submodules: recursive
path: web

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker images
working-directory: ./web
run: |
npm install
npm run build.docker
docker compose push
6 changes: 3 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
build:
context: .
dockerfile: .docker/Dockerfile
image: esoadamo/ksi-be
image: fi0ksi/ksi-be
ports:
- "3030:3030"
volumes:
Expand All @@ -25,11 +25,11 @@ services:
entrypoint: ["/bin/bash", "./.docker/entrypoint.sh"]
ksi-fe-dev:
container_name: ksi-fe-local
image: esoadamo/ksi-fe-local
image: fi0ksi/ksi-fe-local
ports:
- "4201:80"
ksi-fe-old-dev:
container_name: ksi-fe-old-dev
image: esoadamo/ksi-fe-old-local
image: fi0ksi/ksi-fe-old-local
ports:
- "8080:80"

0 comments on commit 896e887

Please sign in to comment.