Remove unnecessary configuration and prepare for more containers
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
version: "3.4"
|
||||
|
||||
services:
|
||||
app:
|
||||
monica:
|
||||
build: ./monica
|
||||
image: monica
|
||||
env_file: ./monica/.env
|
||||
volumes:
|
||||
- data:/var/www/html/storage
|
||||
- monica-data:/var/www/html/storage
|
||||
- monica-public:/var/www/html/public
|
||||
restart: always
|
||||
depends_on:
|
||||
@@ -27,18 +27,15 @@ services:
|
||||
image: nginx:alpine
|
||||
restart: always
|
||||
volumes:
|
||||
- data:/var/www/html/storage:ro
|
||||
- certs:/etc/nginx/certs:ro
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||
- monica-public:/var/www/html/public:ro
|
||||
- monica-public:/var/www/html/monica/public:ro
|
||||
- monica-data:/var/www/html/monica/storage:ro
|
||||
depends_on:
|
||||
- app
|
||||
- monica
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
networks:
|
||||
- proxy-tier
|
||||
- default
|
||||
depends_on:
|
||||
- omgwtfssl
|
||||
|
||||
@@ -53,14 +50,10 @@ services:
|
||||
- SSL_KEY=/certs/personel.scarif.local.key
|
||||
- SSL_CSR=/certs/personel.scarif.local.csr
|
||||
- SSL_CERT=/certs/personel.scarif.local.crt
|
||||
networks:
|
||||
- proxy-tier
|
||||
|
||||
volumes:
|
||||
data:
|
||||
db:
|
||||
certs:
|
||||
monica-public:
|
||||
monica-data:
|
||||
|
||||
networks:
|
||||
proxy-tier:
|
||||
|
||||
@@ -50,6 +50,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
# Run migrations
|
||||
waitfordb
|
||||
${ARTISAN} monica:update --force -vv
|
||||
# Override the linking done by monica:update to use relative paths so the nginx directory can be anywhere
|
||||
unlink ${MONICADIR}/public/storage
|
||||
ln -s ../storage/app/public /var/www/html/public/storage
|
||||
|
||||
if [ -n "${SENTRY_SUPPORT:-}" -a "$SENTRY_SUPPORT" = "true" -a -z "${SENTRY_NORELEASE:-}" -a -n "${SENTRY_ENV:-}" ]; then
|
||||
commit=$(cat .sentry-commit)
|
||||
|
||||
@@ -29,7 +29,7 @@ http {
|
||||
|
||||
# Connect to app service
|
||||
upstream php-handler {
|
||||
server app:9000;
|
||||
server monica:9000;
|
||||
}
|
||||
|
||||
server {
|
||||
@@ -59,7 +59,7 @@ http {
|
||||
# Remove X-Powered-By, which is an information leak
|
||||
fastcgi_hide_header X-Powered-By;
|
||||
|
||||
root /var/www/html/public;
|
||||
root /var/www/html/monica/public;
|
||||
|
||||
index index.html index.htm index.php;
|
||||
|
||||
@@ -115,7 +115,9 @@ http {
|
||||
|
||||
include fastcgi_params;
|
||||
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
# Cannot use $document_root as the path to monica on the docker container
|
||||
# is different to the path to the public files in this nginx container.
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/html/public$fastcgi_script_name;
|
||||
# Bypass the fact that try_files resets $fastcgi_path_info
|
||||
# see: http://trac.nginx.org/nginx/ticket/321
|
||||
set $path_info $fastcgi_path_info;
|
||||
|
||||
Reference in New Issue
Block a user