Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5e53a0a52 | ||
|
|
af9b81afc9 |
@@ -1,14 +1,21 @@
|
|||||||
.bundle
|
.bundle
|
||||||
|
.codex
|
||||||
.env
|
.env
|
||||||
.env.*
|
.env.*
|
||||||
|
.git
|
||||||
|
.github
|
||||||
|
.agents
|
||||||
docker-compose.*
|
docker-compose.*
|
||||||
docker/Dockerfile
|
docker/Dockerfile
|
||||||
docker/dockerfiles
|
docker/dockerfiles
|
||||||
log
|
log
|
||||||
|
spec
|
||||||
storage
|
storage
|
||||||
|
tests
|
||||||
public/system
|
public/system
|
||||||
tmp
|
tmp
|
||||||
.codeclimate.yml
|
.codeclimate.yml
|
||||||
|
coverage
|
||||||
public/packs
|
public/packs
|
||||||
node_modules
|
node_modules
|
||||||
vendor/bundle
|
vendor/bundle
|
||||||
|
|||||||
@@ -78,6 +78,12 @@ jobs:
|
|||||||
platforms: ${{ matrix.platform }}
|
platforms: ${{ matrix.platform }}
|
||||||
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
|
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
|
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
|
- name: Export digest
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -83,6 +83,12 @@ jobs:
|
|||||||
platforms: ${{ matrix.platform }}
|
platforms: ${{ matrix.platform }}
|
||||||
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
|
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
|
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
|
- name: Export digest
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -39,5 +39,9 @@ jobs:
|
|||||||
platforms: ${{ matrix.platform }}
|
platforms: ${{ matrix.platform }}
|
||||||
push: false
|
push: false
|
||||||
load: false
|
load: false
|
||||||
cache-from: type=gha,scope=${{ matrix.platform }}
|
build-args: |
|
||||||
cache-to: type=gha,mode=max,scope=${{ matrix.platform }}
|
GIT_SHA=${{ github.sha }}
|
||||||
|
cache-from: |
|
||||||
|
type=gha,scope=${{ matrix.platform }}
|
||||||
|
type=gha,scope=${{ matrix.platform }}-ce
|
||||||
|
type=gha,scope=${{ matrix.platform }}-ee
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# Variables
|
# Variables
|
||||||
APP_NAME := chatwoot
|
APP_NAME := chatwoot
|
||||||
RAILS_ENV ?= development
|
RAILS_ENV ?= development
|
||||||
|
GIT_SHA ?= $(shell git rev-parse HEAD 2>/dev/null || echo unknown)
|
||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
setup:
|
setup:
|
||||||
@@ -61,6 +62,6 @@ debug_worker:
|
|||||||
overmind connect worker
|
overmind connect worker
|
||||||
|
|
||||||
docker:
|
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
|
.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
@@ -87,13 +87,13 @@ RUN if [ "$RAILS_ENV" = "production" ]; then \
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate .git_sha file with current commit hash
|
# 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
|
# Remove unnecessary files
|
||||||
RUN rm -rf /gems/ruby/3.4.0/cache/*.gem \
|
RUN rm -rf /gems/ruby/3.4.0/cache/*.gem \
|
||||||
&& find /gems/ruby/3.4.0/gems/ \( -name "*.c" -o -name "*.o" \) -delete \
|
&& find /gems/ruby/3.4.0/gems/ \( -name "*.c" -o -name "*.o" \) -delete \
|
||||||
&& rm -rf .git \
|
&& rm -rf .git .gitignore
|
||||||
&& rm .gitignore
|
|
||||||
|
|
||||||
# final build stage
|
# final build stage
|
||||||
FROM ruby:3.4.4-alpine3.21
|
FROM ruby:3.4.4-alpine3.21
|
||||||
|
|||||||
Reference in New Issue
Block a user