Added folders as well...
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
app:
|
||||
build: ./app
|
||||
image: monica-app
|
||||
container_name: monica
|
||||
env_file: .env
|
||||
volumes:
|
||||
- data:/var/www/html/storage
|
||||
restart: unless-stoppped
|
||||
|
||||
cron:
|
||||
build: ./app
|
||||
image: monica-app
|
||||
command: cron.sh
|
||||
env_file: .env
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- data:/var/www/html/storage
|
||||
|
||||
queue:
|
||||
build: ./app
|
||||
image: monica-app
|
||||
command: queue.sh
|
||||
env_file: .env
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- data:/var/www/html/storage
|
||||
|
||||
web:
|
||||
build: ./web
|
||||
image: monica-web
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- VIRTUAL_HOST=monica.niefelheim.com
|
||||
- LETSENCRYPT_HOST=monica.niefelheim.com
|
||||
- LETSENCRYPT_EMAIL=mattias.granlund@gmail.com
|
||||
volumes:
|
||||
- data:/var/www/html/storage:ro
|
||||
networks:
|
||||
- proxy-tier
|
||||
- default
|
||||
volumes:
|
||||
data:
|
||||
mysql:
|
||||
certs:
|
||||
vhost.d:
|
||||
html:
|
||||
networks:
|
||||
proxy-tier:
|
||||
name: bridge
|
||||
external: true
|
||||
|
||||
network_mode: "bridge"
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
- APP_URL=localhost
|
||||
- DB_CONNECTION=mysql
|
||||
- DB_HOST=127.0.0.1
|
||||
- DB_PORT=3306
|
||||
- DB_USER=ferdi
|
||||
- DB_PASSWORD=WUfkwibeLCBikho7
|
||||
- DB_DATABASE=ferdi
|
||||
- DB_SSL=false
|
||||
- MAIL_CONNECTION=smtp
|
||||
- SMTP_HOST=127.0.0.1
|
||||
- SMTP_PORT=2525
|
||||
- MAIL_SSL=false
|
||||
- MAIL_USERNAME=ferdi
|
||||
- MAIL_PASSWORD=yncMdnlA4nopNkzkqXO62fa0ry0=
|
||||
- MAIL_SENDER=ferdi@niefelheim.com
|
||||
- IS_CREATION_ENABLED=true
|
||||
- IS_DASHBOARD_ENABLED=true
|
||||
- IS_REGISTRATION_ENABLED=true
|
||||
- CONNECT_WITH_FRANZ=true
|
||||
- DATA_DIR=/data
|
||||
- TZ=Etc/UTC
|
||||
- PUID=117
|
||||
- PGID=979
|
||||
volumes:
|
||||
- /opt/docker/monica:/var/www/html/storage
|
||||
- /run/mysqld/mysqld.sock:/var/run/mysqld.sock
|
||||
ports:
|
||||
- 80:8456
|
||||
restart: unless-stopped
|
||||
@@ -0,0 +1,49 @@
|
||||
version: "3.9"
|
||||
services:
|
||||
monica:
|
||||
image: lscr.io/linuxserver/monica:latest
|
||||
container_name: monica
|
||||
network_mode: bridge
|
||||
ports:
|
||||
- 8456:80
|
||||
environment:
|
||||
- PUID=82
|
||||
- PGID=82
|
||||
- TZ=Europe/Stockholm
|
||||
- DB_HOST=niefelheim.com
|
||||
- DB_PORT=3306
|
||||
- DB_USERNAME=netshade
|
||||
- DB_PASSWORD=mrmd87
|
||||
- DB_DATABASE=monica
|
||||
- DB_UNIX_SOCKET=/var/run/mysqld/mysqld.sock
|
||||
- DB_USE_UTF8MB4=true
|
||||
- MAIL_FROM_NAME="Ratatosk, Niefelheims messenger."
|
||||
- MAIL_FROM_ADDRESS=ratatosk@niefelheim.com
|
||||
- MAIL_HOST=niefelheim.com
|
||||
- MAIL_MAILER=smtp
|
||||
- MAIL_PASSWORD=4VeN6UPmdNWrXY
|
||||
- MAIL_PORT=25
|
||||
- MAIL_USERNAME=ratatosk@niefelheim.com
|
||||
- MFA_ENABLED=true
|
||||
- GPG_KEYS=528995BFEDFBA7191D46839EF9BA0ADA31CBD89E 39B641343D8C104B2B146DC3F9C39DC0B9698544 F1F692238FBC1666E5A5CCD4199F9DFEF6FFBAFD
|
||||
- DAV_ENABLED=true
|
||||
- APP_KEY=base64:FAh3gDuGgAtMNarC1+xPpmlz8scUOsO5UfxTZy7RYts=
|
||||
- ENABLE_GEOLOCATION=true
|
||||
- LOCATION_IQ_API_KEY=pk.d622d5801094eb0bfd1333b4a812f19b
|
||||
- ENABLE_WEATHER=true
|
||||
- APP_URL=http://localhost
|
||||
- TRUSTED_PROXIES=172.17.0.1,192.168.1.125
|
||||
- APP_ENV=production
|
||||
- APP_DISABLE_SIGNUP=true
|
||||
- REDIS_HOST=192.168.1.125
|
||||
- REDIS_PASSWORD=XF5DiPZD
|
||||
- CACHE_DRIVER=redis
|
||||
- SESSION_DRIVER=redis
|
||||
- QUEUE_CONNECTION=sync
|
||||
volumes:
|
||||
- /run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock
|
||||
- monica:/var/www/html/storage
|
||||
volumes:
|
||||
monica:
|
||||
external: true
|
||||
name: monica
|
||||
@@ -0,0 +1,39 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: monica:fpm
|
||||
container_name: monica_fpm
|
||||
network_mode: bridge
|
||||
environment:
|
||||
- APP_ENV=production
|
||||
- APP_KEY=base64:FAh3gDuGgAtMNarC1+xPpmlz8scUOsO5UfxTZy7RYts=
|
||||
- APP_TRUSTED_PROXIES=172.17.0.1,192.168.1.125
|
||||
- DB_HOST=192.168.1.125
|
||||
- DB_DATABASE=monica
|
||||
- DB_USERNAME=netshade
|
||||
- DB_PASSWORD=mrmd87
|
||||
- LOG_CHANNEL=stderr
|
||||
- CACHE_DRIVER=database
|
||||
- SESSION_DRIVER=database
|
||||
- QUEUE_DRIVER=sync
|
||||
volumes:
|
||||
- monica:/var/www/html/storage
|
||||
restart: unless-stopped
|
||||
web:
|
||||
build: ./web
|
||||
container_name: monica_web
|
||||
network_mode: bridge
|
||||
ports:
|
||||
- 8456:80
|
||||
depends_on:
|
||||
- app
|
||||
volumes:
|
||||
- monica:/var/www/html/storage:ro
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
monica:
|
||||
name: monica
|
||||
driver: local
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
FROM monica:fpm AS monica
|
||||
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
# Copy content of monica image
|
||||
COPY --from=monica /var/www/html /var/www/html
|
||||
RUN ln -sf /var/www/html/storage/app/public /var/www/html/public/storage
|
||||
@@ -0,0 +1,161 @@
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
set_real_ip_from 10.0.0.0/8;
|
||||
set_real_ip_from 172.16.0.0/12;
|
||||
set_real_ip_from 192.168.0.0/16;
|
||||
real_ip_header X-Real-IP;
|
||||
|
||||
# Connect to app service
|
||||
upstream php-handler {
|
||||
server app:9000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
server_name monica;
|
||||
|
||||
## HSTS ##
|
||||
# Add the 'Strict-Transport-Security' headers to enable HSTS protocol.
|
||||
# WARNING: Only add the preload option once you read about the consequences: https://hstspreload.org/.
|
||||
# This form will add the domain to a hardcoded list that is shipped in all major browsers and getting
|
||||
# removed from this list could take several months.
|
||||
#
|
||||
#add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload;" always;
|
||||
|
||||
add_header Referrer-Policy "no-referrer" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-Download-Options "noopen" always;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
||||
add_header X-Robots-Tag "none" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
|
||||
# Remove X-Powered-By, which is an information leak
|
||||
fastcgi_hide_header X-Powered-By;
|
||||
|
||||
root /var/www/html/public;
|
||||
|
||||
index index.html index.htm index.php;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ ^/(?:robots.txt|security.txt) {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
error_page 404 500 502 503 504 /index.php;
|
||||
|
||||
location ~ /\.well-known/(?:carddav|caldav) {
|
||||
return 301 $scheme://$host/dav;
|
||||
}
|
||||
location = /.well-known/security.txt {
|
||||
return 301 $scheme://$host/security.txt;
|
||||
}
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
|
||||
# set max upload size
|
||||
client_max_body_size 10G;
|
||||
fastcgi_buffers 64 4K;
|
||||
|
||||
# Enable gzip but do not remove ETag headers
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 4;
|
||||
gzip_min_length 256;
|
||||
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
|
||||
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
|
||||
|
||||
# Uncomment if your server is build with the ngx_pagespeed module
|
||||
# This module is currently not supported.
|
||||
#pagespeed off;
|
||||
|
||||
location ~ \.php(/|$) {
|
||||
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
|
||||
# Check that the PHP script exists before passing it
|
||||
try_files $fastcgi_script_name =404;
|
||||
|
||||
fastcgi_pass php-handler;
|
||||
fastcgi_index index.php;
|
||||
|
||||
include fastcgi_params;
|
||||
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$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;
|
||||
fastcgi_param PATH_INFO $path_info;
|
||||
}
|
||||
|
||||
# Adding the cache control header for js and css files
|
||||
# Make sure it is BELOW the PHP block
|
||||
location ~ \.(?:css|js|woff2?|svg|gif|json)$ {
|
||||
try_files $uri /index.php$request_uri;
|
||||
add_header Cache-Control "public, max-age=15778463";
|
||||
|
||||
## HSTS ##
|
||||
# Add the 'Strict-Transport-Security' headers to enable HSTS protocol.
|
||||
# Note it is intended to have those duplicated to the ones above.
|
||||
# WARNING: Only add the preload option once you read about the consequences: https://hstspreload.org/.
|
||||
# This form will add the domain to a hardcoded list that is shipped in all major browsers and getting
|
||||
# removed from this list could take several months.
|
||||
#
|
||||
#add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload;" always;
|
||||
|
||||
add_header Referrer-Policy "no-referrer" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-Download-Options "noopen" always;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
||||
add_header X-Robots-Tag "none" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
|
||||
# Optional: Don't log access to assets
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ \.(?:png|html|ttf|ico|jpg|jpeg)$ {
|
||||
try_files $uri /index.php$request_uri;
|
||||
|
||||
# Optional: Don't log access to assets
|
||||
access_log off;
|
||||
}
|
||||
|
||||
# deny access to .htaccess files
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user