mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-06 14:37:26 +01:00
Compare commits
61 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
814dd175c7 | ||
|
|
06f723d7dc | ||
|
|
b599ca5905 | ||
|
|
d222163f82 | ||
|
|
d81eb48e55 | ||
|
|
a7f9ed049c | ||
|
|
aec886c9eb | ||
|
|
84efa573f0 | ||
|
|
849fc2365d | ||
|
|
adfa143861 | ||
|
|
b80e842ad7 | ||
|
|
f8550e7e0d | ||
|
|
f775866abf | ||
|
|
85fad200a0 | ||
|
|
16022da2ac | ||
|
|
40817ae28c | ||
|
|
af5e8d6b4f | ||
|
|
cf822e0de9 | ||
|
|
79dde723bd | ||
|
|
c90298d29c | ||
|
|
b9ba364665 | ||
|
|
77807f94f4 | ||
|
|
854b104915 | ||
|
|
192c59d596 | ||
|
|
fc6d89b9ef | ||
|
|
b572bccd0e | ||
|
|
b9bef3e436 | ||
|
|
475335244f | ||
|
|
0a774f9283 | ||
|
|
d639f649a3 | ||
|
|
b40a60a12d | ||
|
|
e1ed2f0eab | ||
|
|
f9d8cf1fee | ||
|
|
7ab9653a2a | ||
|
|
82a9c8ae19 | ||
|
|
182b600da3 | ||
|
|
279bb447a5 | ||
|
|
f6173f458b | ||
|
|
c000f42e61 | ||
|
|
c348f92aa9 | ||
|
|
d8d8415771 | ||
|
|
f897dc3b2d | ||
|
|
98f60d721c | ||
|
|
ea252c7891 | ||
|
|
abeae7fb64 | ||
|
|
fbb4bd29f7 | ||
|
|
7bb84355df | ||
|
|
3509d03cf5 | ||
|
|
3ea9b66fde | ||
|
|
15feba28e5 | ||
|
|
b1ee5a8e98 | ||
|
|
daccb15073 | ||
|
|
5970556335 | ||
|
|
e1cf8751db | ||
|
|
1ef35c361c | ||
|
|
47b370601c | ||
|
|
c72b175630 | ||
|
|
303c34665b | ||
|
|
094762fcc1 | ||
|
|
fac0ae1798 | ||
|
|
8eee7f9a1a |
22
.github/workflows/auto-close-issues.yml
vendored
22
.github/workflows/auto-close-issues.yml
vendored
@@ -1,21 +1,19 @@
|
|||||||
name: Close stale issues after 5 days
|
name: Close stale issues after 5 days
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
# Run this workflow every day at midnight
|
- cron: "0 0 * * *"
|
||||||
- cron: '0 0 * * *'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
close-stale-issues:
|
close-issues:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
steps:
|
steps:
|
||||||
- name: Close stale issues
|
- uses: actions/stale@v10
|
||||||
uses: actions/stale@v7
|
|
||||||
with:
|
with:
|
||||||
|
days-before-issue-stale: 4
|
||||||
|
days-before-issue-close: 1
|
||||||
|
stale-issue-label: "stale"
|
||||||
|
close-issue-message: "This issue has been automatically closed due to inactivity for 5 days."
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
stale-issue-message: "This issue has been automatically closed due to inactivity for 5 days."
|
exempt-issue-labels: "keep-open,triage,bug"
|
||||||
days-before-stale: 4 # Number of days before marking an issue as stale
|
|
||||||
days-before-close: 1 # Number of days after being marked stale before closing
|
|
||||||
stale-label: "stale" # Label to add to stale issues
|
|
||||||
exempt-issue-labels: "keep-open,triage,bug" # Prevents issues with this label from being closed
|
|
||||||
only-issues: true # Only affects issues, not pull requests
|
|
||||||
|
|||||||
31
.github/workflows/build-image-debian.yaml
vendored
31
.github/workflows/build-image-debian.yaml
vendored
@@ -3,34 +3,47 @@ name: Build Debian Container Image
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
|
- ".github/**"
|
||||||
- "debian/**"
|
- "debian/**"
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
|
- ".github/**"
|
||||||
- "debian/**"
|
- "debian/**"
|
||||||
branches:
|
|
||||||
- master
|
env:
|
||||||
|
REGISTRY_IMAGE: invoiceninja/invoiceninja-debian
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
build:
|
||||||
runs-on: ${{ startsWith(matrix.platforms, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
runs-on: ${{ startsWith(matrix.platform, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: ["linux/amd64", "linux/arm64"]
|
platform:
|
||||||
|
- linux/amd64
|
||||||
|
- linux/arm64
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY_IMAGE }}
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
id: docker_build
|
id: build
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: debian
|
context: debian
|
||||||
load: true
|
platforms: ${{ matrix.platform }}
|
||||||
tags: invoiceninja/invoiceninja-debian:test
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
tags: ${{ env.REGISTRY_IMAGE }}
|
||||||
|
outputs: type=image,push-by-digest=true,name-canonical=true
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
|||||||
166
.github/workflows/publish-image-debian.yaml
vendored
Normal file
166
.github/workflows/publish-image-debian.yaml
vendored
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
name: Publish Debian Container Images
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags-ignore:
|
||||||
|
- "invoiceninja-*"
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY_IMAGE: invoiceninja/invoiceninja-debian
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
version:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.version.outputs.version }}
|
||||||
|
major: ${{ steps.version.outputs.major }}
|
||||||
|
minor: ${{ steps.version.outputs.minor }}
|
||||||
|
url: ${{ steps.version.outputs.url }}
|
||||||
|
steps:
|
||||||
|
- id: version
|
||||||
|
run: |
|
||||||
|
|
||||||
|
VERSION=edge
|
||||||
|
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||||
|
VERSION=${GITHUB_REF#refs/tags/}
|
||||||
|
# Remove -o or -d suffix if present
|
||||||
|
VERSION=${VERSION%-*}
|
||||||
|
fi
|
||||||
|
MAJOR="$(echo "${VERSION}" | cut -d. -f1)"
|
||||||
|
MINOR="$(echo "${VERSION}" | cut -d. -f2)"
|
||||||
|
URL=https://github.com/invoiceninja/invoiceninja/releases/download/v${VERSION}/invoiceninja.tar.gz
|
||||||
|
|
||||||
|
# Debug output
|
||||||
|
echo "Current version: ${VERSION}"
|
||||||
|
echo "Version pattern check: $([[ $VERSION =~ ^5\.[0-9]{1,3}\.[0-9]{1,3}$ ]] && echo "matches" || echo "doesn't match")"
|
||||||
|
|
||||||
|
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||||
|
echo "major=${MAJOR}" >> $GITHUB_OUTPUT
|
||||||
|
echo "minor=${MINOR}" >> $GITHUB_OUTPUT
|
||||||
|
echo "url=${URL}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ${{ startsWith(matrix.platform, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
||||||
|
needs:
|
||||||
|
- version
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform:
|
||||||
|
- linux/amd64
|
||||||
|
- linux/arm64
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
id: prep
|
||||||
|
run: |
|
||||||
|
platform=${{ matrix.platform }}
|
||||||
|
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY_IMAGE }}
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Build and push by digest
|
||||||
|
id: build
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: debian
|
||||||
|
build-args: URL=${{ needs.version.outputs.url }}
|
||||||
|
platforms: ${{ matrix.platform }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
tags: ${{ env.REGISTRY_IMAGE }}
|
||||||
|
outputs: type=image,push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
|
- name: Export digest
|
||||||
|
run: |
|
||||||
|
mkdir -p ${{ runner.temp }}/digests
|
||||||
|
digest="${{ steps.build.outputs.digest }}"
|
||||||
|
touch "${{ runner.temp }}/digests/${digest#sha256:}"
|
||||||
|
|
||||||
|
- name: Upload digest
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: digests-${{ env.PLATFORM_PAIR }}
|
||||||
|
path: ${{ runner.temp }}/digests/*
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
merge:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- version
|
||||||
|
- build
|
||||||
|
steps:
|
||||||
|
- name: Download digests
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
path: ${{ runner.temp }}/digests
|
||||||
|
pattern: digests-*
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY_IMAGE }}
|
||||||
|
tags: |
|
||||||
|
${{ needs.version.outputs.version }}
|
||||||
|
${{ needs.version.outputs.major }}
|
||||||
|
${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}
|
||||||
|
latest
|
||||||
|
|
||||||
|
- name: Create manifest list and push
|
||||||
|
working-directory: ${{ runner.temp }}/digests
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
run: |
|
||||||
|
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||||
|
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
|
||||||
|
|
||||||
|
- name: Inspect image
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
run: |
|
||||||
|
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
|
||||||
|
|
||||||
|
Description:
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- merge
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
with:
|
||||||
|
sparse-checkout: "README.md"
|
||||||
|
|
||||||
|
- name: Docker Hub Description
|
||||||
|
uses: peter-evans/dockerhub-description@v4
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
repository: ${{ env.REGISTRY_IMAGE }}
|
||||||
71
.github/workflows/publish-image.yaml
vendored
71
.github/workflows/publish-image.yaml
vendored
@@ -1,71 +0,0 @@
|
|||||||
name: Publish Debian Container Images
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags-ignore:
|
|
||||||
- "invoiceninja-*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
docker:
|
|
||||||
runs-on: ${{ startsWith(matrix.platforms, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: ["linux/amd64", "linux/arm64"]
|
|
||||||
include:
|
|
||||||
- image: invoiceninja/invoiceninja-debian
|
|
||||||
context: debian
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v5
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Prepare
|
|
||||||
id: prep
|
|
||||||
run: |
|
|
||||||
DOCKER_IMAGE=${{ matrix.image }}
|
|
||||||
VERSION=edge
|
|
||||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
|
||||||
VERSION=${GITHUB_REF#refs/tags/}
|
|
||||||
fi
|
|
||||||
TAGS="${DOCKER_IMAGE}:${VERSION}"
|
|
||||||
MAJOR="$(echo "${VERSION}" | cut -d. -f1)"
|
|
||||||
MINOR="$(echo "${VERSION}" | cut -d. -f2)"
|
|
||||||
TAGS="$TAGS,${DOCKER_IMAGE}:${MAJOR},${DOCKER_IMAGE}:${MAJOR}.${MINOR}"
|
|
||||||
|
|
||||||
# Debug output
|
|
||||||
echo "Current version: ${VERSION}"
|
|
||||||
echo "Version pattern check: $([[ $VERSION =~ ^5\.[0-9]{1,3}\.[0-9]{1,3}$ ]] && echo "matches" || echo "doesn't match")"
|
|
||||||
|
|
||||||
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
|
|
||||||
|
|
||||||
echo "tags=${TAGS}" >> $GITHUB_OUTPUT # Updated output syntax
|
|
||||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
|
||||||
echo "major=${MAJOR}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Login to DockerHub
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build and push
|
|
||||||
id: docker_build
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: ${{ matrix.context }}
|
|
||||||
build-args: INVOICENINJA_VERSION=${{ steps.prep.outputs.version }}
|
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
tags: ${{ steps.prep.outputs.tags }}
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
|
|
||||||
- name: Image digest
|
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
[](https://hub.docker.com/r/invoiceninja/invoiceninja-debian)
|
[](https://hub.docker.com/r/invoiceninja/invoiceninja-debian)
|
||||||
[](https://hub.docker.com/r/invoiceninja/invoiceninja-debian)
|
[](https://hub.docker.com/r/invoiceninja/invoiceninja-debian)
|
||||||
[](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image.yaml)
|
[](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image-debian.yaml)
|
||||||
[](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-v5.yaml)
|
[](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-debian.yaml)
|
||||||
|
|
||||||
# Debian Docker for [Invoice Ninja](https://www.invoiceninja.com/)
|
# Debian Docker for [Invoice Ninja](https://www.invoiceninja.com/)
|
||||||
|
|
||||||
:crown: **Features**
|
👑 **Features**
|
||||||
|
|
||||||
NGINX webserver support [NGINX](https://nginx.org/)
|
NGINX webserver support [NGINX](https://nginx.org/)
|
||||||
Built-in Chrome for PDF generation and other features
|
Built-in Chrome for PDF generation and other features
|
||||||
|
|||||||
11
debian/Dockerfile
vendored
11
debian/Dockerfile
vendored
@@ -2,10 +2,11 @@ ARG PHP=8.4
|
|||||||
|
|
||||||
FROM php:${PHP}-fpm AS prepare-app
|
FROM php:${PHP}-fpm AS prepare-app
|
||||||
|
|
||||||
USER www-data
|
ARG URL=https://github.com/invoiceninja/invoiceninja/releases/latest/download/invoiceninja.tar.gz
|
||||||
|
|
||||||
RUN curl -sL "https://github.com/invoiceninja/invoiceninja/releases/latest/download/invoiceninja.tar.gz" | \
|
ADD ${URL} /tmp/invoiceninja.tar.gz
|
||||||
tar -xz -C /var/www/html \
|
|
||||||
|
RUN tar -xzf /tmp/invoiceninja.tar.gz -C /var/www/html \
|
||||||
&& ln -s /var/www/html/resources/views/react/index.blade.php /var/www/html/public/index.html \
|
&& ln -s /var/www/html/resources/views/react/index.blade.php /var/www/html/public/index.html \
|
||||||
&& php artisan storage:link \
|
&& php artisan storage:link \
|
||||||
# Workaround for application updates
|
# Workaround for application updates
|
||||||
@@ -75,8 +76,8 @@ RUN echo "skip-ssl = true" >> /etc/mysql/mariadb.conf.d/50-client.cnf
|
|||||||
COPY supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
COPY supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|
||||||
# Setup InvoiceNinja
|
# Setup InvoiceNinja
|
||||||
COPY --from=prepare-app /var/www/html /var/www/html
|
COPY --from=prepare-app --chown=www-data:www-data /var/www/html /var/www/html
|
||||||
COPY --from=prepare-app /tmp/public /tmp/public
|
COPY --from=prepare-app --chown=www-data:www-data /tmp/public /tmp/public
|
||||||
|
|
||||||
# Add initialization script
|
# Add initialization script
|
||||||
COPY --chmod=0755 scripts/init.sh /usr/local/bin/init.sh
|
COPY --chmod=0755 scripts/init.sh /usr/local/bin/init.sh
|
||||||
|
|||||||
46
debian/docker-compose.yml
vendored
46
debian/docker-compose.yml
vendored
@@ -1,9 +1,3 @@
|
|||||||
x-logging: &default-logging
|
|
||||||
options:
|
|
||||||
max-size: "10m"
|
|
||||||
max-file: "3"
|
|
||||||
driver: json-file
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build:
|
build:
|
||||||
@@ -13,20 +7,16 @@ services:
|
|||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
volumes:
|
volumes:
|
||||||
- ./.env:/var/www/html/.env
|
|
||||||
# - ./php/php.ini:/usr/local/etc/php/conf.d/invoiceninja.ini:ro
|
# - ./php/php.ini:/usr/local/etc/php/conf.d/invoiceninja.ini:ro
|
||||||
# - ./php/php-fpm.conf:/usr/local/etc/php-fpm.d/invoiceninja.conf:ro
|
# - ./php/php-fpm.conf:/usr/local/etc/php-fpm.d/invoiceninja.conf:ro
|
||||||
# - ./supervisor/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf:ro
|
# - ./supervisor/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf:ro
|
||||||
- app_public:/var/www/html/public
|
- app_public:/var/www/html/public
|
||||||
- app_storage:/var/www/html/storage
|
- app_storage:/var/www/html/storage
|
||||||
networks:
|
|
||||||
- app-network
|
|
||||||
depends_on:
|
depends_on:
|
||||||
mysql:
|
mysql:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
redis:
|
redis:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
logging: *default-logging
|
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:alpine
|
image: nginx:alpine
|
||||||
@@ -37,18 +27,13 @@ services:
|
|||||||
- ./nginx:/etc/nginx/conf.d:ro
|
- ./nginx:/etc/nginx/conf.d:ro
|
||||||
- app_public:/var/www/html/public:ro
|
- app_public:/var/www/html/public:ro
|
||||||
- app_storage:/var/www/html/storage:ro
|
- app_storage:/var/www/html/storage:ro
|
||||||
networks:
|
|
||||||
- app-network
|
|
||||||
depends_on:
|
depends_on:
|
||||||
app:
|
app:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
logging: *default-logging
|
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:8
|
image: mysql:8
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
|
||||||
- ./.env
|
|
||||||
environment:
|
environment:
|
||||||
MYSQL_DATABASE: ${DB_DATABASE}
|
MYSQL_DATABASE: ${DB_DATABASE}
|
||||||
MYSQL_USER: ${DB_USERNAME}
|
MYSQL_USER: ${DB_USERNAME}
|
||||||
@@ -56,38 +41,31 @@ services:
|
|||||||
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
||||||
volumes:
|
volumes:
|
||||||
- mysql_data:/var/lib/mysql
|
- mysql_data:/var/lib/mysql
|
||||||
networks:
|
|
||||||
- app-network
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost", "-u${MYSQL_USER}", "-p${MYSQL_PASSWORD}" ]
|
test:
|
||||||
interval: 10s
|
[
|
||||||
timeout: 5s
|
"CMD",
|
||||||
retries: 5
|
"mysqladmin",
|
||||||
logging: *default-logging
|
"ping",
|
||||||
|
"-h",
|
||||||
|
"localhost",
|
||||||
|
"-u${MYSQL_USER}",
|
||||||
|
"-p${MYSQL_PASSWORD}",
|
||||||
|
]
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- redis_data:/data
|
- redis_data:/data
|
||||||
networks:
|
|
||||||
- app-network
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "redis-cli", "ping" ]
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
interval: 10s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 5
|
|
||||||
logging: *default-logging
|
|
||||||
|
|
||||||
networks:
|
|
||||||
app-network:
|
|
||||||
driver: bridge
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
app_public:
|
app_public:
|
||||||
driver: local
|
driver: local
|
||||||
app_storage:
|
app_storage:
|
||||||
driver: local
|
driver: local
|
||||||
mysql_data:
|
mysql_data:
|
||||||
driver: local
|
driver: local
|
||||||
redis_data:
|
redis_data:
|
||||||
|
|||||||
1
debian/php/php.ini
vendored
1
debian/php/php.ini
vendored
@@ -2,6 +2,7 @@
|
|||||||
; https://www.php.net/manual/en/ini.core.php
|
; https://www.php.net/manual/en/ini.core.php
|
||||||
post_max_size=10M
|
post_max_size=10M
|
||||||
upload_max_filesize=10M
|
upload_max_filesize=10M
|
||||||
|
memory_limit=512M
|
||||||
|
|
||||||
[opcache]
|
[opcache]
|
||||||
; https://www.php.net/manual/en/opcache.installation.php#opcache.installation.recommended
|
; https://www.php.net/manual/en/opcache.installation.php#opcache.installation.recommended
|
||||||
|
|||||||
8
debian/scripts/init.sh
vendored
8
debian/scripts/init.sh
vendored
@@ -10,6 +10,7 @@ fi
|
|||||||
if [ "$*" = 'supervisord -c /etc/supervisor/supervisord.conf' ]; then
|
if [ "$*" = 'supervisord -c /etc/supervisor/supervisord.conf' ]; then
|
||||||
|
|
||||||
# Check for required folders and create if needed
|
# Check for required folders and create if needed
|
||||||
|
[ -d /var/www/html/public ] || mkdir -p /var/www/html/public
|
||||||
[ -d /var/www/html/storage/app/public ] || mkdir -p /var/www/html/storage/app/public
|
[ -d /var/www/html/storage/app/public ] || mkdir -p /var/www/html/storage/app/public
|
||||||
[ -d /var/www/html/storage/framework/sessions ] || mkdir -p /var/www/html/storage/framework/sessions
|
[ -d /var/www/html/storage/framework/sessions ] || mkdir -p /var/www/html/storage/framework/sessions
|
||||||
[ -d /var/www/html/storage/framework/views ] || mkdir -p /var/www/html/storage/framework/views
|
[ -d /var/www/html/storage/framework/views ] || mkdir -p /var/www/html/storage/framework/views
|
||||||
@@ -21,10 +22,11 @@ if [ "$*" = 'supervisord -c /etc/supervisor/supervisord.conf' ]; then
|
|||||||
rm -rf /var/www/html/public/.htaccess \
|
rm -rf /var/www/html/public/.htaccess \
|
||||||
/var/www/html/public/.well-known \
|
/var/www/html/public/.well-known \
|
||||||
/var/www/html/public/*
|
/var/www/html/public/*
|
||||||
mv /tmp/public/* \
|
cp -r /tmp/public/* \
|
||||||
/tmp/public/.htaccess \
|
/tmp/public/.htaccess \
|
||||||
/tmp/public/.well-known \
|
/tmp/public/.well-known \
|
||||||
/var/www/html/public/
|
/var/www/html/public/ && \
|
||||||
|
rm -rf /tmp/public/*
|
||||||
fi
|
fi
|
||||||
echo "Public Folder is up to date"
|
echo "Public Folder is up to date"
|
||||||
|
|
||||||
@@ -41,7 +43,7 @@ if [ "$*" = 'supervisord -c /etc/supervisor/supervisord.conf' ]; then
|
|||||||
|
|
||||||
# Clear and cache config in production
|
# Clear and cache config in production
|
||||||
if [ "$APP_ENV" = "production" ]; then
|
if [ "$APP_ENV" = "production" ]; then
|
||||||
runuser -u www-data -- php artisan migrate --force
|
runuser -u www-data -- php artisan migrate --force
|
||||||
runuser -u www-data -- php artisan cache:clear # Clear after the migration
|
runuser -u www-data -- php artisan cache:clear # Clear after the migration
|
||||||
runuser -u www-data -- php artisan ninja:design-update
|
runuser -u www-data -- php artisan ninja:design-update
|
||||||
runuser -u www-data -- php artisan optimize
|
runuser -u www-data -- php artisan optimize
|
||||||
|
|||||||
Reference in New Issue
Block a user