mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-06 06:27:25 +01:00
Compare commits
9 Commits
5.10.55-r1
...
5.10.55-r5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4431abcb88 | ||
|
|
d05e55a24e | ||
|
|
34e5043317 | ||
|
|
6f92d1c155 | ||
|
|
11330003a2 | ||
|
|
47b015af7c | ||
|
|
c6648a8511 | ||
|
|
de2036adff | ||
|
|
ea8c5fed8e |
24
debian/Dockerfile
vendored
24
debian/Dockerfile
vendored
@@ -117,10 +117,19 @@ WORKDIR /var/www/html
|
||||
RUN set -eux; \
|
||||
DOWNLOAD_URL=$(curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \
|
||||
grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | cut -d '"' -f 4) && \
|
||||
curl -L "$DOWNLOAD_URL" | tar -xfvz -C /var/www/html --overwrite && \
|
||||
rm -rf /var/www/html/ui && \
|
||||
echo "Downloading from: $DOWNLOAD_URL" && \
|
||||
# Download and save the tar
|
||||
curl -L "$DOWNLOAD_URL" -o /tmp/ninja.tar && \
|
||||
# Try extraction
|
||||
cd /var/www/html && \
|
||||
tar -xf /tmp/ninja.tar && \
|
||||
# List what was extracted
|
||||
rm -f /tmp/ninja.tar && \
|
||||
chown -R www-data:www-data /var/www/html
|
||||
|
||||
# After setting permissions, switch to www-data for remaining operations
|
||||
USER www-data
|
||||
|
||||
# Install dependencies
|
||||
RUN composer install --no-dev --no-scripts --no-autoloader
|
||||
|
||||
@@ -131,6 +140,8 @@ RUN composer dump-autoload --optimize \
|
||||
&& php artisan config:cache \
|
||||
&& php artisan route:cache
|
||||
|
||||
USER root
|
||||
|
||||
# Setup supervisor
|
||||
COPY supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
@@ -151,7 +162,7 @@ RUN mkdir -p \
|
||||
/var/www/html/storage/framework/sessions \
|
||||
/var/www/html/storage/framework/views \
|
||||
/var/www/html/storage/logs \
|
||||
/var/www/html/public/uploads \
|
||||
/var/www/html/public/storage \
|
||||
/var/run \
|
||||
/var/log/supervisor
|
||||
|
||||
@@ -159,16 +170,19 @@ RUN mkdir -p \
|
||||
RUN chown -R www-data:www-data \
|
||||
/var/www/html/storage \
|
||||
/var/www/html/bootstrap/cache \
|
||||
/var/www/html/public/uploads \
|
||||
/var/www/html/public/storage \
|
||||
/var/run \
|
||||
/var/log/supervisor \
|
||||
&& chmod -R 775 \
|
||||
/var/www/html/public/uploads \
|
||||
/var/www/html/public/storage \
|
||||
/var/www/html/storage \
|
||||
/var/www/html/bootstrap/cache \
|
||||
/var/run \
|
||||
/var/log/supervisor
|
||||
|
||||
# Switch to www-data for runtime
|
||||
USER www-data
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
|
||||
CMD php -v || exit 1
|
||||
|
||||
22
debian/docker-compose.yml
vendored
22
debian/docker-compose.yml
vendored
@@ -8,7 +8,7 @@ x-logging: &default-logging
|
||||
|
||||
services:
|
||||
app:
|
||||
image: invoiceninja/invoiceninja-debian:5.10.55-d
|
||||
image: invoiceninja/invoiceninja-debian:latest
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ./.env
|
||||
@@ -16,7 +16,8 @@ services:
|
||||
- ./.env:/var/www/html/.env
|
||||
- app_storage:/var/www/html/storage
|
||||
- app_cache:/var/www/html/bootstrap/cache
|
||||
- public_files:/var/www/html/public
|
||||
- public_storage:/var/www/html/public/storage
|
||||
user: www-data:www-data
|
||||
|
||||
networks:
|
||||
- app-network
|
||||
@@ -35,14 +36,13 @@ services:
|
||||
image: nginx:alpine
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8013:80"
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- type: volume
|
||||
source: public_files
|
||||
target: /var/www/html/public
|
||||
read_only: true
|
||||
volumes_from:
|
||||
- app
|
||||
|
||||
networks:
|
||||
- app-network
|
||||
depends_on:
|
||||
@@ -103,13 +103,11 @@ networks:
|
||||
volumes:
|
||||
app_storage:
|
||||
driver: local
|
||||
app_public:
|
||||
driver: local
|
||||
app_cache:
|
||||
driver: local
|
||||
public_storage:
|
||||
driver: local # Persistent storage for user files
|
||||
mysql_data:
|
||||
driver: local
|
||||
redis_data:
|
||||
driver: local
|
||||
public_files:
|
||||
driver: local
|
||||
driver: local
|
||||
Reference in New Issue
Block a user