Fixed docker-compose example file

This commit is contained in:
João Vitória Silva
2024-07-24 15:06:58 +01:00
parent c53ef002a7
commit 76153fcefb
7 changed files with 14 additions and 142 deletions

2
.github/FUNDING.yml vendored
View File

@@ -1,7 +1,7 @@
# These are supported funding model platforms
github: joaovitoriasilva # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: 84745218 # Replace with a single Patreon username
#patreon: # Replace with a single Patreon username
#open_collective: # Replace with a single Open Collective username
#ko_fi: # Replace with a single Ko-fi username
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel

View File

@@ -1,34 +1,3 @@
# name: Create backend Docker image with latest tag on manual trigger
# on:
# workflow_dispatch:
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Build the backend Docker image
# run: |
# ls -al
# IMAGE_TAG="latest"
# docker build . --file Dockerfile_backend --tag ${{ github.repository }}/backend:$IMAGE_TAG
# echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV
# if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
# - name: Push the backend Docker image to GHCR
# if: success() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
# run: |
# echo ${{ secrets.TOKEN_FOR_ACTIONS }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
# IMAGE_NAME="ghcr.io/${{ github.repository }}/backend"
# docker tag ${{ github.repository }}/backend:$IMAGE_TAG $IMAGE_NAME:$IMAGE_TAG
# docker push $IMAGE_NAME:$IMAGE_TAG
name: Create backend Docker image with latest tag on manual trigger
on:

View File

@@ -1,41 +1,3 @@
# name: Create backend Docker image on new release or using manual trigger
# on:
# workflow_dispatch:
# release:
# types:
# - created
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Build the backend Docker image
# run: |
# ls -al
# if [ "${{ github.event_name }}" == 'workflow_dispatch' ]; then
# IMAGE_TAG="dev_$(date +"%d%m%Y")"
# else
# IMAGE_TAG="${{ github.event.release.tag_name }}"
# fi
# docker build . --file Dockerfile_backend --tag ${{ github.repository }}/backend:$IMAGE_TAG
# echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV
# if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
# - name: Push the backend Docker image to GHCR
# if: success() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
# run: |
# echo ${{ secrets.TOKEN_FOR_ACTIONS }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
# IMAGE_NAME="ghcr.io/${{ github.repository }}/backend"
# docker tag ${{ github.repository }}/backend:$IMAGE_TAG $IMAGE_NAME:$IMAGE_TAG
# docker push $IMAGE_NAME:$IMAGE_TAG
name: Create backend Docker image on new release or using manual trigger
on:
@@ -66,6 +28,13 @@ jobs:
run: |
docker buildx create --use
- name: Verify app directory exists
run: |
if [ ! -d "./app" ]; then
echo "Directory 'app' does not exist."
exit 1
fi
- name: Build and push the backend Docker image
run: |
if [ "${{ github.event_name }}" == 'workflow_dispatch' ]; then

View File

@@ -1,32 +1,3 @@
# name: Create frontend Docker image with latest tag on manual trigger
# on:
# workflow_dispatch:
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Build the frontend Docker image
# run: |
# IMAGE_TAG="latest"
# docker build . --file Dockerfile_frontend --tag ${{ github.repository }}/frontend:$IMAGE_TAG
# echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV
# if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
# - name: Push the frontend Docker image to GHCR
# if: success() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
# run: |
# echo ${{ secrets.TOKEN_FOR_ACTIONS }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
# IMAGE_NAME="ghcr.io/${{ github.repository }}/frontend"
# docker tag ${{ github.repository }}/frontend:$IMAGE_TAG $IMAGE_NAME:$IMAGE_TAG
# docker push $IMAGE_NAME:$IMAGE_TAG
name: Create frontend Docker image with latest tag on manual trigger
on:

View File

@@ -1,39 +1,3 @@
# name: Create frontend Docker image on new release or using manual trigger
# on:
# workflow_dispatch:
# release:
# types:
# - created
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Build the frontend Docker image
# run: |
# if [ "${{ github.event_name }}" == 'workflow_dispatch' ]; then
# IMAGE_TAG="dev_$(date +"%d%m%Y")"
# else
# IMAGE_TAG="${{ github.event.release.tag_name }}"
# fi
# docker build . --file Dockerfile_frontend --tag ${{ github.repository }}/frontend:$IMAGE_TAG
# echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV
# if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
# - name: Push the frontend Docker image to GHCR
# if: success() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
# run: |
# echo ${{ secrets.TOKEN_FOR_ACTIONS }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
# IMAGE_NAME="ghcr.io/${{ github.repository }}/frontend"
# docker tag ${{ github.repository }}/frontend:$IMAGE_TAG $IMAGE_NAME:$IMAGE_TAG
# docker push $IMAGE_NAME:$IMAGE_TAG
name: Create frontend Docker image on new release or using manual trigger
on: