Compare commits

...
6 changed files with 34 additions and 10 deletions
+7
View File
@@ -1,14 +1,21 @@
.bundle
.codex
.env
.env.*
.git
.github
.agents
docker-compose.*
docker/Dockerfile
docker/dockerfiles
log
spec
storage
tests
public/system
tmp
.codeclimate.yml
coverage
public/packs
node_modules
vendor/bundle
+8 -2
View File
@@ -78,6 +78,12 @@ jobs:
platforms: ${{ matrix.platform }}
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
outputs: type=image,name=${{ env.DOCKER_REPO }},push-by-digest=true,name-canonical=true,push=true
build-args: |
GIT_SHA=${{ github.sha }}
cache-from: |
type=gha,scope=${{ matrix.platform }}
type=gha,scope=${{ matrix.platform }}-ee
cache-to: type=gha,mode=max,scope=${{ matrix.platform }}-ee
- name: Export digest
run: |
@@ -125,7 +131,7 @@ jobs:
else
TAG="${DOCKER_REPO}:${SANITIZED_REF}"
fi
docker buildx imagetools create -t $TAG \
$(printf '${{ env.DOCKER_REPO }}@sha256:%s ' *)
@@ -139,5 +145,5 @@ jobs:
else
TAG="${DOCKER_REPO}:${SANITIZED_REF}"
fi
docker buildx imagetools inspect $TAG
+8 -2
View File
@@ -83,6 +83,12 @@ jobs:
platforms: ${{ matrix.platform }}
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
outputs: type=image,name=${{ env.DOCKER_REPO }},push-by-digest=true,name-canonical=true,push=true
build-args: |
GIT_SHA=${{ github.sha }}
cache-from: |
type=gha,scope=${{ matrix.platform }}
type=gha,scope=${{ matrix.platform }}-ce
cache-to: type=gha,mode=max,scope=${{ matrix.platform }}-ce
- name: Export digest
run: |
@@ -130,7 +136,7 @@ jobs:
else
TAG="${DOCKER_REPO}:${SANITIZED_REF}-ce"
fi
docker buildx imagetools create -t $TAG \
$(printf '${{ env.DOCKER_REPO }}@sha256:%s ' *)
@@ -144,5 +150,5 @@ jobs:
else
TAG="${DOCKER_REPO}:${SANITIZED_REF}-ce"
fi
docker buildx imagetools inspect $TAG
+6 -2
View File
@@ -39,5 +39,9 @@ jobs:
platforms: ${{ matrix.platform }}
push: false
load: false
cache-from: type=gha,scope=${{ matrix.platform }}
cache-to: type=gha,mode=max,scope=${{ matrix.platform }}
build-args: |
GIT_SHA=${{ github.sha }}
cache-from: |
type=gha,scope=${{ matrix.platform }}
type=gha,scope=${{ matrix.platform }}-ce
type=gha,scope=${{ matrix.platform }}-ee
+2 -1
View File
@@ -1,6 +1,7 @@
# Variables
APP_NAME := chatwoot
RAILS_ENV ?= development
GIT_SHA ?= $(shell git rev-parse HEAD 2>/dev/null || echo unknown)
# Targets
setup:
@@ -61,6 +62,6 @@ debug_worker:
overmind connect worker
docker:
docker build -t $(APP_NAME) -f ./docker/Dockerfile .
docker build --build-arg GIT_SHA=$(GIT_SHA) -t $(APP_NAME) -f ./docker/Dockerfile .
.PHONY: setup db_create db_migrate db_seed db_reset db console server burn docker run force_run force_run_tunnel debug debug_worker
+3 -3
View File
@@ -87,13 +87,13 @@ RUN if [ "$RAILS_ENV" = "production" ]; then \
fi
# Generate .git_sha file with current commit hash
RUN git rev-parse HEAD > /app/.git_sha
ARG GIT_SHA="unknown"
RUN printf "%s\n" "$GIT_SHA" > /app/.git_sha
# Remove unnecessary files
RUN rm -rf /gems/ruby/3.4.0/cache/*.gem \
&& find /gems/ruby/3.4.0/gems/ \( -name "*.c" -o -name "*.o" \) -delete \
&& rm -rf .git \
&& rm .gitignore
&& rm -rf .git .gitignore
# final build stage
FROM ruby:3.4.4-alpine3.21