mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-06 14:37:26 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e35653fe59 | ||
|
|
4d7cc8e464 | ||
|
|
c6e122b81f | ||
|
|
421a1f10e6 | ||
|
|
84db77cde8 | ||
|
|
e8706de11c |
@@ -1,4 +1,7 @@
|
|||||||
APP_URL=http://in.localhost:8003/
|
APP_URL=http://${CNAME}:${port}
|
||||||
|
PORT=8003
|
||||||
|
CNAME=in.localhost
|
||||||
|
|
||||||
APP_KEY=<insert your generated key in here>
|
APP_KEY=<insert your generated key in here>
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
MULTI_DB_ENABLED=false
|
MULTI_DB_ENABLED=false
|
||||||
@@ -16,4 +19,4 @@ DB_HOST=db
|
|||||||
DB_DATABASE=ninja
|
DB_DATABASE=ninja
|
||||||
DB_USERNAME=ninja
|
DB_USERNAME=ninja
|
||||||
DB_PASSWORD=ninja
|
DB_PASSWORD=ninja
|
||||||
APP_CIPHER=AES-256-CBC
|
APP_CIPHER=AES-256-CBC
|
||||||
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
*.sql
|
||||||
|
# docker/*
|
||||||
|
|
||||||
|
.env
|
||||||
|
!.env.example
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
echo "Early Entry"
|
|
||||||
|
|
||||||
cleanup ()
|
|
||||||
{
|
|
||||||
kill -s SIGTERM $!
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
trap cleanup SIGINT SIGTERM
|
|
||||||
|
|
||||||
while :
|
|
||||||
do
|
|
||||||
sleep 60 ; cd /var/www/app/ && php artisan schedule:run;
|
|
||||||
done
|
|
||||||
8
config/shutdown.sh
Normal file
8
config/shutdown.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
printf "READY\n";
|
||||||
|
|
||||||
|
while read line; do
|
||||||
|
echo "Processing Event: $line" >&2;
|
||||||
|
kill -SIGQUIT $PPID
|
||||||
|
done < /dev/stdin
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
[supervisord]
|
[supervisord]
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
|
||||||
nodaemon=true
|
nodaemon=true
|
||||||
user=invoiceninja
|
user=invoiceninja
|
||||||
pidfile=/var/run/supervisord/supervisord.pid
|
pidfile=/var/run/supervisord/supervisord.pid
|
||||||
@@ -8,7 +7,6 @@ logfile_maxbytes=0
|
|||||||
loglevel=error
|
loglevel=error
|
||||||
|
|
||||||
[program:php-fpm]
|
[program:php-fpm]
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
@@ -19,7 +17,6 @@ stderr_logfile_maxbytes=0
|
|||||||
command=php-fpm
|
command=php-fpm
|
||||||
|
|
||||||
[program:scheduler]
|
[program:scheduler]
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
@@ -39,4 +36,12 @@ stdout_logfile_maxbytes=0
|
|||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
numprocs=2
|
numprocs=2
|
||||||
command=php artisan queue:work --sleep=3 --tries=1 --memory=256 --timeout=3600 --daemon
|
command=php artisan queue:work --sleep=3 --tries=3 --memory=256
|
||||||
|
|
||||||
|
[eventlistener:shutdown]
|
||||||
|
command=/shutdown.sh
|
||||||
|
events=PROCESS_STATE_STOPPED, PROCESS_STATE_EXITED, PROCESS_STATE_FATAL
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
@@ -1,88 +1,73 @@
|
|||||||
version: '3.7'
|
version: "3.7"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: nginx
|
image: nginx
|
||||||
restart: always
|
restart: always
|
||||||
env_file: env
|
env_file: .env
|
||||||
volumes:
|
volumes:
|
||||||
# Vhost configuration
|
# Vhost configuration
|
||||||
#- ./config/caddy/Caddyfile:/etc/caddy/Caddyfiledocker-com
|
#- ./config/caddy/Caddyfile:/etc/caddy/Caddyfiledocker-com
|
||||||
- ./config/nginx/in-vhost.conf:/etc/nginx/conf.d/in-vhost.conf:ro
|
- ./config/nginx/in-vhost.conf:/etc/nginx/conf.d/in-vhost.conf:ro
|
||||||
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
|
|
||||||
- ./docker/app/public:/var/www/app/public:rw,delegated
|
- ./docker/app/public:/var/www/app/public:rw,delegated
|
||||||
- ./docker/app/storage:/var/www/app/storage:rw,delegated
|
- ./docker/app/storage:/var/www/app/storage:rw,delegated
|
||||||
depends_on:
|
depends_on:
|
||||||
- app
|
- app
|
||||||
# Run webserver nginx on port 80
|
# Run webserver nginx on port 80
|
||||||
# Feel free to modify depending what port is already occupied
|
# Feel free to modify depending what port is already occupied
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- ${PORT}:80
|
||||||
#- "443:443"
|
#- "443:443"
|
||||||
networks:
|
networks:
|
||||||
- invoiceninja
|
- invoiceninja
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "in5.localhost:192.168.0.124 " #host and ip
|
- "${CNAME}:192.168.0.124 " #host and ip
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: invoiceninja/invoiceninja:5
|
image: invoiceninja/invoiceninja:5
|
||||||
env_file: env
|
env_file: .env
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
|
|
||||||
- ./config/hosts:/etc/hosts:ro
|
- ./config/hosts:/etc/hosts:ro
|
||||||
|
- ./config/shutdown.sh:/usr/local/bin/shutdown.sh
|
||||||
- ./docker/app/public:/var/www/app/public:rw,delegated
|
- ./docker/app/public:/var/www/app/public:rw,delegated
|
||||||
- ./docker/app/storage:/var/www/app/storage:rw,delegated
|
- ./docker/app/storage:/var/www/app/storage:rw,delegated
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
networks:
|
networks:
|
||||||
- invoiceninja
|
- invoiceninja
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "in5.localhost:192.168.0.124 " #host and ip
|
- "${CNAME}:192.168.0.124 " #host and ip
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: mysql:5
|
image: mysql:5
|
||||||
|
env_file: .env
|
||||||
ports:
|
ports:
|
||||||
- "3305:3306"
|
- "3305:3306"
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword
|
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD1} # config for 5
|
||||||
- MYSQL_USER=ninja
|
- MYSQL_USER=${DB_USERNAME1}
|
||||||
- MYSQL_PASSWORD=ninja
|
- MYSQL_PASSWORD=${DB_PASSWORD1}
|
||||||
- MYSQL_DATABASE=ninja
|
- MYSQL_DATABASE=${DB_DATABASE1}
|
||||||
|
# - MYSQL_ROOT_PASSWORD=${DB_PASSWORD} # config for 4
|
||||||
|
# - MYSQL_USER=${DB_USERNAME}
|
||||||
|
# - MYSQL_PASSWORD=${DB_PASSWORD}
|
||||||
|
# - MYSQL_DATABASE=${DB_DATABASE}
|
||||||
volumes:
|
volumes:
|
||||||
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
|
|
||||||
- ./docker/mysql/data:/var/lib/mysql:rw,delegated
|
- ./docker/mysql/data:/var/lib/mysql:rw,delegated
|
||||||
networks:
|
networks:
|
||||||
- invoiceninja
|
- invoiceninja
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "in5.localhost:192.168.0.124 " #host and ip
|
- "${CNAME}:192.168.0.124 " #host and ip
|
||||||
|
|
||||||
# THIS IS ONLY A VALID CONFIGURATION FOR IN 5. DO NOT USE FOR IN 4.
|
|
||||||
# cron:
|
|
||||||
# image: invoiceninja/invoiceninja:5
|
|
||||||
# env_file: env
|
|
||||||
# volumes:
|
|
||||||
# - ./config/cron.sh:/usr/local/bin/cron.sh
|
|
||||||
# - ./config/hosts:/etc/hosts:ro
|
|
||||||
# - ./docker/app/public:/var/www/app/public:rw,delegated
|
|
||||||
# - ./docker/app/storage:/var/www/app/storage:rw,delegated
|
|
||||||
# command:
|
|
||||||
# - cron.sh
|
|
||||||
# depends_on:
|
|
||||||
# - app
|
|
||||||
# networks:
|
|
||||||
# - invoiceninja
|
|
||||||
# extra_hosts:
|
|
||||||
# - "in5.localhost:192.168.0.124 " #host and ip
|
|
||||||
|
|
||||||
# THIS IS ONLY A VALID CONFIGURATION FOR IN 4. DO NOT USE FOR IN 5.
|
# THIS IS ONLY A VALID CONFIGURATION FOR IN 4. DO NOT USE FOR IN 5.
|
||||||
# cron:
|
# cron:
|
||||||
# image: invoiceninja/invoiceninja:alpine-4
|
# image: invoiceninja/invoiceninja:alpine-4
|
||||||
# volumes:
|
# volumes:
|
||||||
# - ./docker/app/public:/var/www/app/public:rw,delegated
|
# - ./docker/app/public:/var/www/app/public:rw,delegated
|
||||||
# - ./docker/app/storage:/var/www/app/storage:rw,delegated
|
# - ./docker/app/storage:/var/www/app/storage:rw,delegated
|
||||||
# - ./docker/app/public/logo:/var/www/app/public/logo:rw,delegated
|
# - ./docker/app/public/logo:/var/www/app/public/logo:rw,delegated
|
||||||
# entrypoint: |
|
# entrypoint: |
|
||||||
# /bin/sh -c 'sh -s <<EOF
|
# /bin/sh -c 'sh -s <<EOF
|
||||||
# trap "break;exit" SIGHUP SIGINT SIGTERM
|
# trap "break;exit" SIGHUP SIGINT SIGTERM
|
||||||
@@ -95,7 +80,7 @@ services:
|
|||||||
# EOF'
|
# EOF'
|
||||||
# networks:
|
# networks:
|
||||||
# - invoiceninja
|
# - invoiceninja
|
||||||
#
|
#
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
invoiceninja:
|
invoiceninja:
|
||||||
|
|||||||
Reference in New Issue
Block a user