Compare commits
4 Commits
0.8.0
...
0e93b2e780
Author | SHA1 | Date | |
---|---|---|---|
0e93b2e780
|
|||
1b5f805195
|
|||
748d05f8fc | |||
b662a85572
|
15
app/.dockerignore
Normal file
15
app/.dockerignore
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
**/.env
|
||||||
|
**/*.env
|
||||||
|
**/.env.example
|
||||||
|
**/storage/app/*
|
||||||
|
**/storage/debugbar
|
||||||
|
**/storage/framework/cache/*
|
||||||
|
**/storage/framework/sessions/*
|
||||||
|
**/storage/framework/views/*
|
||||||
|
**/storage/framework/testing/*
|
||||||
|
**/storage/logs/*
|
||||||
|
**/vendor/
|
||||||
|
**/node_modules/
|
||||||
|
**/public/build/
|
||||||
|
**/public/storage
|
||||||
|
|
@@ -1,8 +0,0 @@
|
|||||||
**/*.env
|
|
||||||
**/*.env.example
|
|
||||||
application/bootstrap/cache/*
|
|
||||||
application/storage/**
|
|
||||||
application/vendor/**
|
|
||||||
application/node_modules/**
|
|
||||||
application/public/build/**
|
|
||||||
application/public/storage
|
|
@@ -5,6 +5,7 @@ set -euo pipefail
|
|||||||
WAITLOOPS=5
|
WAITLOOPS=5
|
||||||
SLEEPSEC=1
|
SLEEPSEC=1
|
||||||
unitd="unitd"
|
unitd="unitd"
|
||||||
|
role=${CONTAINER_ROLE:-app}
|
||||||
|
|
||||||
curl_put()
|
curl_put()
|
||||||
{
|
{
|
||||||
@@ -22,7 +23,7 @@ curl_put()
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$unitd" = "unitd" ] || [ "$unitd" = "unitd-debug" ]; then
|
if [ "$role" = "app" ]; then
|
||||||
echo "$0: Launching Unit daemon to perform initial configuration..."
|
echo "$0: Launching Unit daemon to perform initial configuration..."
|
||||||
/usr/sbin/$unitd --control unix:/var/run/control.unit.sock
|
/usr/sbin/$unitd --control unix:/var/run/control.unit.sock
|
||||||
for i in $(/usr/bin/seq $WAITLOOPS); do
|
for i in $(/usr/bin/seq $WAITLOOPS); do
|
||||||
@@ -61,7 +62,7 @@ if [ "$unitd" = "unitd" ] || [ "$unitd" = "unitd-debug" ]; then
|
|||||||
|
|
||||||
if [ ! -z ${UNIT_SOURCE+x} ]
|
if [ ! -z ${UNIT_SOURCE+x} ]
|
||||||
then
|
then
|
||||||
echo "[${UNIT_SOURCE}]" > /docker-entrypoint.d/unit_source.json
|
echo $UNIT_SOURCE > /docker-entrypoint.d/unit_source.json
|
||||||
curl_put "/docker-entrypoint.d/unit_source.json" "config/listeners/*:9000/forwarded/source"
|
curl_put "/docker-entrypoint.d/unit_source.json" "config/listeners/*:9000/forwarded/source"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -5,6 +5,7 @@ set -euo pipefail
|
|||||||
WAITLOOPS=5
|
WAITLOOPS=5
|
||||||
SLEEPSEC=1
|
SLEEPSEC=1
|
||||||
unitd="unitd"
|
unitd="unitd"
|
||||||
|
role=${CONTAINER_ROLE:-app}
|
||||||
|
|
||||||
curl_put()
|
curl_put()
|
||||||
{
|
{
|
||||||
@@ -22,7 +23,7 @@ curl_put()
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$unitd" = "unitd" ] || [ "$unitd" = "unitd-debug" ]; then
|
if [ "$role" = "app" ]; then
|
||||||
echo "$0: Launching Unit daemon to perform initial configuration..."
|
echo "$0: Launching Unit daemon to perform initial configuration..."
|
||||||
/usr/sbin/$unitd --control unix:/var/run/control.unit.sock
|
/usr/sbin/$unitd --control unix:/var/run/control.unit.sock
|
||||||
for i in $(/usr/bin/seq $WAITLOOPS); do
|
for i in $(/usr/bin/seq $WAITLOOPS); do
|
||||||
@@ -61,7 +62,7 @@ if [ "$unitd" = "unitd" ] || [ "$unitd" = "unitd-debug" ]; then
|
|||||||
|
|
||||||
if [ ! -z ${UNIT_SOURCE+x} ]
|
if [ ! -z ${UNIT_SOURCE+x} ]
|
||||||
then
|
then
|
||||||
echo "[${UNIT_SOURCE}]" > /docker-entrypoint.d/unit_source.json
|
echo $UNIT_SOURCE > /docker-entrypoint.d/unit_source.json
|
||||||
curl_put "/docker-entrypoint.d/unit_source.json" "config/listeners/*:9000/forwarded/source"
|
curl_put "/docker-entrypoint.d/unit_source.json" "config/listeners/*:9000/forwarded/source"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -102,7 +103,9 @@ php artisan config:cache
|
|||||||
php artisan event:cache
|
php artisan event:cache
|
||||||
php artisan route:cache
|
php artisan route:cache
|
||||||
php artisan view:cache
|
php artisan view:cache
|
||||||
php artisan migrate --force
|
if [ "$role" = "app" ]; then
|
||||||
|
php artisan migrate --force
|
||||||
|
fi
|
||||||
|
|
||||||
chown -R unit:unit /var/www/html
|
chown -R unit:unit /var/www/html
|
||||||
chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
|
chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
|
||||||
|
@@ -11,7 +11,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- ${DOCKER_NGINX_PORT}:80
|
- ${DOCKER_NGINX_PORT}:80
|
||||||
app:
|
app:
|
||||||
image: korelf/service-captcha:0.8.0
|
image: korelf/service-captcha:0.8.1
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@@ -19,7 +19,7 @@ services:
|
|||||||
- reverb
|
- reverb
|
||||||
env_file: app/.env
|
env_file: app/.env
|
||||||
queue:
|
queue:
|
||||||
image: korelf/service-captcha:0.8.0
|
image: korelf/service-captcha:0.8.1
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@@ -28,7 +28,7 @@ services:
|
|||||||
CONTAINER_ROLE: queue
|
CONTAINER_ROLE: queue
|
||||||
env_file: app/.env
|
env_file: app/.env
|
||||||
reverb:
|
reverb:
|
||||||
image: korelf/service-captcha:0.8.0
|
image: korelf/service-captcha:0.8.1
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@@ -39,7 +39,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- ${DOCKER_WEBSOCKET_PORT}:9000
|
- ${DOCKER_WEBSOCKET_PORT}:9000
|
||||||
scheduler:
|
scheduler:
|
||||||
image: korelf/service-captcha:0.8.0
|
image: korelf/service-captcha:0.8.1
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
Reference in New Issue
Block a user