mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-24 08:45:10 +00:00
- Enhanced README.md to clarify the inclusion of built-in CRM features in ERPNext and updated the application list. - Introduced RUNTIME_FIX.md to document the removal of the CRM application due to compatibility issues with Frappe v15, detailing the error encountered and providing alternative solutions. - Updated deployment strategies and troubleshooting steps to ensure successful application setup.
133 lines
3.4 KiB
YAML
133 lines
3.4 KiB
YAML
name: Build Dokploy Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'dokploy/**'
|
|
- 'images/production/**'
|
|
- 'resources/**'
|
|
tags:
|
|
- 'v*.*.*'
|
|
- 'dokploy-v*.*.*'
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'dokploy/**'
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository }}/erpnext-complete
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Extract metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
tags: |
|
|
type=ref,event=branch
|
|
type=ref,event=pr
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=semver,pattern={{major}}
|
|
type=sha,prefix={{branch}}-
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
|
flavor: |
|
|
latest=auto
|
|
|
|
- name: Free Disk Space
|
|
run: |
|
|
sudo rm -rf /usr/share/dotnet
|
|
sudo rm -rf /opt/ghc
|
|
sudo rm -rf "/usr/local/share/boost"
|
|
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
|
sudo docker system prune -af
|
|
df -h
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./dokploy/Dockerfile
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
platforms: linux/amd64
|
|
build-args: |
|
|
FRAPPE_BRANCH=version-15
|
|
PYTHON_VERSION=3.11.6
|
|
no-cache: false
|
|
|
|
- name: Image digest
|
|
run: echo ${{ steps.meta.outputs.digest }}
|
|
|
|
test-deployment:
|
|
needs: build-and-push
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'pull_request'
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Create test environment file
|
|
run: |
|
|
cd dokploy
|
|
cat > .env.test << EOF
|
|
SITE_NAME=test.localhost
|
|
ADMIN_PASSWORD=testpassword
|
|
DB_PASSWORD=testdbpassword
|
|
HTTP_PORT=8080
|
|
EOF
|
|
|
|
- name: Start services
|
|
run: |
|
|
cd dokploy
|
|
docker-compose --env-file .env.test up -d
|
|
|
|
- name: Wait for services to be healthy
|
|
run: |
|
|
timeout 600 bash -c 'until docker-compose -f dokploy/docker-compose.yml ps | grep -q "healthy"; do sleep 10; done'
|
|
|
|
- name: Check site creation
|
|
run: |
|
|
docker-compose -f dokploy/docker-compose.yml logs create-site
|
|
docker-compose -f dokploy/docker-compose.yml ps create-site | grep "Exit 0"
|
|
|
|
- name: Test site accessibility
|
|
run: |
|
|
sleep 30
|
|
curl -f http://localhost:8080/api/method/ping || exit 1
|
|
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
cd dokploy
|
|
docker-compose down -v
|
|
|