4
.env
@@ -1,10 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Ghost
|
# Ghost
|
||||||
GHOST_EMAIL=admin@openrsc.com
|
|
||||||
GHOST_PASSWORD=malwareinfection
|
|
||||||
GHOST_DATABASE_NAME=ghost
|
|
||||||
ALLOW_EMPTY_PASSWORD=no
|
|
||||||
URL=http://localhost/blog
|
URL=http://localhost/blog
|
||||||
|
|
||||||
# Nginx
|
# Nginx
|
||||||
|
|||||||
5
.gitignore
vendored
@@ -30,9 +30,10 @@ Splunk/opt-splunk-var/*
|
|||||||
|
|
||||||
*.log
|
*.log
|
||||||
|
|
||||||
etc/nginx/default.conf
|
|
||||||
|
|
||||||
etc/logs/nginx/*.log
|
etc/logs/nginx/*.log
|
||||||
etc/logs/letsencrypt/*
|
etc/logs/letsencrypt/*
|
||||||
etc/ghost/logs/*.log
|
etc/ghost/logs/*.log
|
||||||
etc/ghost/logs/*.log.*
|
etc/ghost/logs/*.log.*
|
||||||
|
!etc/ghost/content/data/
|
||||||
|
!etc/ghost/content/logs
|
||||||
|
etc/ghost/content/data/\.DS_Store
|
||||||
|
|||||||
@@ -71,39 +71,26 @@ services:
|
|||||||
- "./Website:/usr/local/tomcat/webapps/ROOT"
|
- "./Website:/usr/local/tomcat/webapps/ROOT"
|
||||||
- "./etc/tomcat:/usr/local/tomcat/conf"
|
- "./etc/tomcat:/usr/local/tomcat/conf"
|
||||||
|
|
||||||
fix-ghost-permissions:
|
|
||||||
image: 'bitnami/ghost:latest'
|
|
||||||
container_name: ghost-fix-permissions
|
|
||||||
user: root
|
|
||||||
command: chown -R 1001:1001 /bitnami/ghost
|
|
||||||
volumes:
|
|
||||||
- "./etc/ghost:/bitnami/ghost"
|
|
||||||
depends_on:
|
|
||||||
- mysqldb
|
|
||||||
|
|
||||||
ghost:
|
ghost:
|
||||||
image: bitnami/ghost:latest
|
image: ghost:latest
|
||||||
container_name: ghost
|
container_name: ghost
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:2368:2368"
|
- "127.0.0.1:2368:2368"
|
||||||
volumes:
|
restart: always
|
||||||
- "./etc/ghost/content:/opt/bitnami/ghost/content"
|
|
||||||
env_file:
|
env_file:
|
||||||
- ".env"
|
- ".env"
|
||||||
|
volumes:
|
||||||
|
- "./etc/ghost/content:/var/lib/ghost/content"
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- url=${URL}
|
||||||
- privacy__useUpdateCheck=0
|
- database__client=mysql
|
||||||
- URL=${URL}
|
- database__connection__host=mysql
|
||||||
- MARIADB_HOST=mysql
|
- database__connection__user=${MARIADB_ROOT_USER}
|
||||||
- MARIADB_PORT_NUMBER=3306
|
- database__connection__password=${MARIADB_ROOT_PASSWORD}
|
||||||
- GHOST_DATABASE_USER=${MARIADB_ROOT_USER}
|
- database__connection__database=ghost
|
||||||
- GHOST_DATABASE_PASSWORD=${MARIADB_ROOT_PASSWORD}
|
- privacy__useUpdateCheck=false
|
||||||
- GHOST_DATABASE_NAME=${GHOST_DATABASE_NAME}
|
|
||||||
- ALLOW_EMPTY_PASSWORD=${ALLOW_EMPTY_PASSWORD}
|
|
||||||
- GHOST_EMAIL=${GHOST_EMAIL}
|
|
||||||
- GHOST_PASSWORD=${GHOST_PASSWORD}
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- fix-ghost-permissions
|
- mysqldb
|
||||||
|
|
||||||
php:
|
php:
|
||||||
image: nanoninja/php-fpm:7.2
|
image: nanoninja/php-fpm:7.2
|
||||||
|
|||||||
0
etc/ghost/content/apps/.gitsave
Executable file
0
etc/ghost/content/data/.gitsave
Normal file
BIN
etc/ghost/content/images/2018/08/bar.png
Executable file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
etc/ghost/content/images/2018/08/lumby.png
Executable file
|
After Width: | Height: | Size: 510 KiB |
BIN
etc/ghost/content/images/2018/08/noobscam1-2.jpg
Executable file
|
After Width: | Height: | Size: 38 KiB |
BIN
etc/ghost/content/images/2018/08/twitch.png
Executable file
|
After Width: | Height: | Size: 432 KiB |
|
Before Width: | Height: | Size: 693 KiB |
0
etc/ghost/content/images/2018/08/wod.png
Executable file → Normal file
|
Before Width: | Height: | Size: 693 KiB After Width: | Height: | Size: 693 KiB |
@@ -1 +0,0 @@
|
|||||||
/opt/bitnami/ghost/logs
|
|
||||||
0
etc/ghost/content/logs/.gitsave
Executable file
11
etc/ghost/content/settings/routes-1.0-backup.yaml
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
routes:
|
||||||
|
|
||||||
|
collections:
|
||||||
|
/:
|
||||||
|
permalink: '{globals.permalinks}' # special 1.0 compatibility setting. See the docs for details.
|
||||||
|
template:
|
||||||
|
- index
|
||||||
|
|
||||||
|
taxonomies:
|
||||||
|
tag: /tag/{slug}/
|
||||||
|
author: /author/{slug}/
|
||||||
@@ -2,7 +2,7 @@ routes:
|
|||||||
|
|
||||||
collections:
|
collections:
|
||||||
/:
|
/:
|
||||||
permalink: '{globals.permalinks}' # special 1.0 compatibility setting. See the docs for details.
|
permalink: /{year}/{month}/{day}/{slug}/
|
||||||
template:
|
template:
|
||||||
- index
|
- index
|
||||||
|
|
||||||
|
|||||||
@@ -36,12 +36,9 @@ server {
|
|||||||
ssl_stapling on;
|
ssl_stapling on;
|
||||||
ssl_stapling_verify on;
|
ssl_stapling_verify on;
|
||||||
resolver 8.8.8.8 1.1.1.1;
|
resolver 8.8.8.8 1.1.1.1;
|
||||||
# ssl_certificate /etc/letsencrypt/live/openrsc.com/fullchain.pem;
|
ssl_certificate /etc/letsencrypt/live/openrsc.com/fullchain.pem;
|
||||||
# ssl_certificate_key /etc/letsencrypt/live/openrsc.com/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/openrsc.com/privkey.pem;
|
||||||
# ssl_trusted_certificate /etc/letsencrypt/live/openrsc.com/chain.pem;
|
ssl_trusted_certificate /etc/letsencrypt/live/openrsc.com/chain.pem;
|
||||||
ssl_certificate /etc/letsencrypt/live/localhost/selfsigned.crt;
|
|
||||||
ssl_certificate_key /etc/letsencrypt/live/localhost/selfsigned.key;
|
|
||||||
ssl_trusted_certificate /etc/letsencrypt/live/localhost/dhparam.pem;
|
|
||||||
|
|
||||||
root /app;
|
root /app;
|
||||||
index index.jsp index.html index.htm;
|
index index.jsp index.html index.htm;
|
||||||
|
|||||||
53
etc/nginx/default.conf
Executable file
@@ -0,0 +1,53 @@
|
|||||||
|
upstream tomcat {
|
||||||
|
server tomcat:8080;
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream ghost {
|
||||||
|
server ghost:2368;
|
||||||
|
}
|
||||||
|
|
||||||
|
# HTTP
|
||||||
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
listen [::]:80 default_server ipv6only=on;
|
||||||
|
server_name ${NGINX_HOST};
|
||||||
|
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
|
||||||
|
root /app;
|
||||||
|
index index.jsp index.html index.htm;
|
||||||
|
|
||||||
|
client_max_body_size 100M;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /var/www/html;
|
||||||
|
}
|
||||||
|
|
||||||
|
####### Proxies #######
|
||||||
|
# # PHP proxy
|
||||||
|
# location /board {
|
||||||
|
# fastcgi_pass php:9001;
|
||||||
|
# fastcgi_index index.php;
|
||||||
|
# include fastcgi.conf;
|
||||||
|
# root /app;
|
||||||
|
# }
|
||||||
|
|
||||||
|
# Ghost proxy
|
||||||
|
location /blog {
|
||||||
|
proxy_pass http://ghost;
|
||||||
|
proxy_set_header Host $http_host; # required for docker client's sake
|
||||||
|
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_read_timeout 900;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Tomcat proxy
|
||||||
|
location ~ \.jsp$ {
|
||||||
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Server $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_pass http://tomcat;
|
||||||
|
}
|
||||||
|
}
|
||||||