update for buildx compatibility
This commit is contained in:
@@ -60,42 +60,48 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
grep -o '^[^#]*' .env.example > .env
|
grep -o '^[^#]*' .env.example > .env
|
||||||
cat .env >> $GITHUB_ENV
|
cat .env >> $GITHUB_ENV
|
||||||
|
echo "DATABASE_HOST=localhost:5432" >> $GITHUB_ENV
|
||||||
|
eval $(sed -e '/^#/d' -e 's/^/export /' -e 's/$/;/' .env) ;
|
||||||
|
|
||||||
# - name: Set up Docker Buildx
|
|
||||||
# uses: docker/setup-buildx-action@v2
|
|
||||||
# with:
|
|
||||||
# driver-opts: |
|
|
||||||
# network=stack
|
|
||||||
|
|
||||||
- name: Start database
|
- name: Start database
|
||||||
run: |
|
run: |
|
||||||
docker compose up -d database
|
docker compose up -d database
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
with:
|
||||||
|
driver-opts: |
|
||||||
|
network=container:database
|
||||||
|
buildkitd-flags: |
|
||||||
|
--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
|
||||||
|
|
||||||
|
|
||||||
# - name: Build and push image
|
- name: Build and push image
|
||||||
# id: docker_build
|
id: docker_build
|
||||||
# uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v3
|
||||||
# with:
|
with:
|
||||||
# context: ./
|
context: ./
|
||||||
# file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
# push: false
|
push: false
|
||||||
# # platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
# # The test image is /docker and is private. final image will be /calendso and public
|
# The test image is /docker and is private. final image will be /calendso and public
|
||||||
# tags: docker.io/${{ secrets.DOCKER_HUB_USERNAME }}/calendso:canary
|
tags: docker.io/${{ secrets.DOCKER_HUB_USERNAME }}/calendso:canary
|
||||||
# # network: stack
|
# network: stack
|
||||||
# build-args: |
|
build-args: |
|
||||||
# NEXT_PUBLIC_WEBAPP_URL=${{ env.NEXT_PUBLIC_WEBAPP_URL }}
|
NEXT_PUBLIC_WEBAPP_URL=${{ env.NEXT_PUBLIC_WEBAPP_URL }}
|
||||||
# NEXT_PUBLIC_LICENSE_CONSENT=${{ env.NEXT_PUBLIC_LICENSE_CONSENT }}
|
NEXT_PUBLIC_LICENSE_CONSENT=${{ env.NEXT_PUBLIC_LICENSE_CONSENT }}
|
||||||
# NEXT_PUBLIC_TELEMETRY_KEY=${{ env.NEXT_PUBLIC_TELEMETRY_KEY }}
|
NEXT_PUBLIC_TELEMETRY_KEY=${{ env.NEXT_PUBLIC_TELEMETRY_KEY }}
|
||||||
# DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }}
|
DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }}
|
||||||
|
|
||||||
- name: Build with docker compose
|
# - name: Build with docker compose
|
||||||
run: |
|
# run: |
|
||||||
DOCKER_BUILDKIT=0 docker compose build --build-arg DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }} calcom
|
# DOCKER_BUILDKIT=0 docker compose build --build-arg DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }} calcom
|
||||||
|
|
||||||
- name: Push docker image
|
# - name: Push docker image
|
||||||
run: |
|
# run: |
|
||||||
docker tag docker_calcom:latest calendso/calendso:latest
|
# docker tag docker_calcom:latest calendso/calendso:latest
|
||||||
docker push calendso/calendso:latest
|
# docker push calendso/calendso:latest
|
||||||
|
|
||||||
- name: Cleanup
|
- name: Cleanup
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Use postgres/example user/password credentials
|
# Use postgres/example user/password credentials
|
||||||
version: '3.1'
|
version: '3.8'
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
database-data:
|
database-data:
|
||||||
@@ -11,6 +11,7 @@ networks:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
database:
|
database:
|
||||||
|
container_name: database
|
||||||
image: postgres
|
image: postgres
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
@@ -24,13 +25,12 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
args:
|
args:
|
||||||
- NEXT_PUBLIC_WEBAPP_URL=${NEXT_PUBLIC_WEBAPP_URL}
|
NEXT_PUBLIC_WEBAPP_URL: ${NEXT_PUBLIC_WEBAPP_URL}
|
||||||
- NEXT_PUBLIC_LICENSE_CONSENT=${NEXT_PUBLIC_LICENSE_CONSENT}
|
NEXT_PUBLIC_LICENSE_CONSENT: ${NEXT_PUBLIC_LICENSE_CONSENT}
|
||||||
- CALCOM_TELEMETRY_DISABLED=${CALCOM_TELEMETRY_DISABLED}
|
CALCOM_TELEMETRY_DISABLE: ${CALCOM_TELEMETRY_DISABLED}
|
||||||
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
|
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
|
||||||
- CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY}
|
CALENDSO_ENCRYPTION_KEY: ${CALENDSO_ENCRYPTION_KEY}
|
||||||
- DATABASE_URL=${DATABASE_URL}
|
DATABASE_URL: ${DATABASE_URL}
|
||||||
network: stack
|
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- stack
|
- stack
|
||||||
|
|||||||
Reference in New Issue
Block a user