refactor: simplify Docker and CI/CD to use unified config
- Replace symlinked Dockerfile with simplified version in root - Reduce Docker build args (unified config provides defaults) - Update CI/CD workflows to use minimal build arguments - Add nginx.conf to root directory (replace docker/nginx.conf) - Remove docker-bake references from CI/CD workflows - Focus on essential runtime overrides only - Let unified config handle smart defaults
This commit is contained in:
@@ -47,31 +47,19 @@ jobs:
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./docker
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ gitea.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
VITE_COUCHDB_URL=${{ vars.VITE_COUCHDB_URL || 'http://localhost:5984' }}
|
||||
VITE_COUCHDB_USER=${{ vars.VITE_COUCHDB_USER || 'admin' }}
|
||||
VITE_COUCHDB_PASSWORD=${{ secrets.VITE_COUCHDB_PASSWORD || 'change-this-secure-password' }}
|
||||
APP_BASE_URL=${{ vars.APP_BASE_URL || 'http://localhost:8080' }}
|
||||
VITE_GOOGLE_CLIENT_ID=${{ vars.VITE_GOOGLE_CLIENT_ID || '' }}
|
||||
VITE_GITHUB_CLIENT_ID=${{ vars.VITE_GITHUB_CLIENT_ID || '' }}
|
||||
NODE_ENV=production
|
||||
VITE_COUCHDB_URL=${{ vars.VITE_COUCHDB_URL }}
|
||||
VITE_COUCHDB_USER=${{ vars.VITE_COUCHDB_USER }}
|
||||
VITE_COUCHDB_PASSWORD=${{ secrets.VITE_COUCHDB_PASSWORD }}
|
||||
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
|
||||
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
|
||||
|
||||
- name: Build with Bake (Alternative)
|
||||
if: false # Set to true to use bake instead
|
||||
uses: docker/bake-action@v4
|
||||
with:
|
||||
workdir: ./docker
|
||||
files: docker-bake.hcl
|
||||
targets: prod
|
||||
push: ${{ gitea.event_name != 'pull_request' }}
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
|
||||
Reference in New Issue
Block a user