Docker and Ghost CMS overhaul
16
.env
@@ -1,14 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Ghost
|
# Ghost
|
||||||
URL=http://localhost
|
GHOST_HOST=localhost/ghost
|
||||||
|
GHOST_EMAIL=admin@openrsc.com
|
||||||
|
GHOST_PASSWORD=malwareinfection
|
||||||
|
GHOST_DATABASE_NAME=ghost
|
||||||
|
ALLOW_EMPTY_PASSWORD=no
|
||||||
|
|
||||||
# Nginx
|
# Nginx
|
||||||
NGINX_HOST=localhost
|
NGINX_HOST=localhost
|
||||||
|
|
||||||
# MySQL
|
# MySQL
|
||||||
MYSQL_DATABASE=test
|
MARIADB_DATABASE=test
|
||||||
MYSQL_ROOT_USER=root
|
MARIADB_ROOT_USER=root
|
||||||
MYSQL_ROOT_PASSWORD=root
|
MARIADB_ROOT_PASSWORD=root
|
||||||
MYSQL_USER=dev
|
MARIADB_USER=user
|
||||||
MYSQL_PASSWORD=dev
|
MARIADB_PASS=pass
|
||||||
|
|||||||
@@ -546,9 +546,10 @@ elif [ "$choice" == "2" ]; then
|
|||||||
unzip -o Game/client/cache.zip -d ~/OpenRSC
|
unzip -o Game/client/cache.zip -d ~/OpenRSC
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Importing the game databases."
|
echo "Importing the databases."
|
||||||
echo ""
|
echo ""
|
||||||
sudo make import-game
|
sudo make import-game
|
||||||
|
sudo make import-ghost
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Creating a backup of your current databases as \"Docker-Home/data/db/db.sql\""
|
echo "Creating a backup of your current databases as \"Docker-Home/data/db/db.sql\""
|
||||||
|
|||||||
32
Makefile
@@ -57,28 +57,31 @@ logs:
|
|||||||
backup:
|
backup:
|
||||||
@sudo mkdir -p $(MYSQL_DUMPS_DIR)
|
@sudo mkdir -p $(MYSQL_DUMPS_DIR)
|
||||||
@$(shell sudo chmod -R 777 $(MYSQL_DUMPS_DIR))
|
@$(shell sudo chmod -R 777 $(MYSQL_DUMPS_DIR))
|
||||||
@docker exec $(shell docker-compose ps -q mysqldb) mysqldump --all-databases -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" > $(MYSQL_DUMPS_DIR)/db.sql 2>/dev/null
|
@docker exec $(shell docker-compose ps -q mysqldb) mysqldump --all-databases -u"$(MARIADB_ROOT_USER)" -p"$(MARIADB_ROOT_PASSWORD)" > $(MYSQL_DUMPS_DIR)/db.sql 2>/dev/null
|
||||||
|
|
||||||
backup-windows:
|
backup-windows:
|
||||||
@docker exec -i mysql mysqldump --all-databases -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" > $(MYSQL_DUMPS_DIR)/db.sql
|
@docker exec -i mysql mysqldump --all-databases -u"$(MARIADB_ROOT_USER)" -p"$(MARIADB_ROOT_PASSWORD)" > $(MYSQL_DUMPS_DIR)/db.sql
|
||||||
|
|
||||||
restore:
|
restore:
|
||||||
@docker exec -i $(shell docker-compose ps -q mysqldb) mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < $(MYSQL_DUMPS_DIR)/db.sql 2>/dev/null
|
@docker exec -i $(shell docker-compose ps -q mysqldb) mysql -u"$(MARIADB_ROOT_USER)" -p"$(MARIADB_ROOT_PASSWORD)" < $(MYSQL_DUMPS_DIR)/db.sql 2>/dev/null
|
||||||
|
|
||||||
restore-windows:
|
restore-windows:
|
||||||
@docker exec -i mysql mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < $(MYSQL_DUMPS_DIR)/db.sql
|
@docker exec -i mysql mysql -u"$(MARIADB_ROOT_USER)" -p"$(MARIADB_ROOT_PASSWORD)" < $(MYSQL_DUMPS_DIR)/db.sql
|
||||||
|
|
||||||
import-game:
|
import-game:
|
||||||
@docker exec -i $(shell docker-compose ps -q mysqldb) mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Game/Databases/openrsc_config.sql 2>/dev/null
|
@docker exec -i $(shell sudo docker-compose ps -q mysqldb) mysql -u"$(MARIADB_ROOT_USER)" -p"$(MARIADB_ROOT_PASSWORD)" < Game/Databases/openrsc_config.sql 2>/dev/null
|
||||||
@docker exec -i $(shell docker-compose ps -q mysqldb) mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Game/Databases/openrsc_logs.sql 2>/dev/null
|
@docker exec -i $(shell sudo docker-compose ps -q mysqldb) mysql -u"$(MARIADB_ROOT_USER)" -p"$(MARIADB_ROOT_PASSWORD)" < Game/Databases/openrsc_logs.sql 2>/dev/null
|
||||||
@docker exec -i $(shell docker-compose ps -q mysqldb) mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Game/Databases/openrsc.sql 2>/dev/null
|
@docker exec -i $(shell sudo docker-compose ps -q mysqldb) mysql -u"$(MARIADB_ROOT_USER)" -p"$(MARIADB_ROOT_PASSWORD)" < Game/Databases/openrsc.sql 2>/dev/null
|
||||||
@docker exec -i $(shell docker-compose ps -q mysqldb) mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Game/Databases/openrsc_tools.sql 2>/dev/null
|
@docker exec -i $(shell sudo docker-compose ps -q mysqldb) mysql -u"$(MARIADB_ROOT_USER)" -p"$(MARIADB_ROOT_PASSWORD)" < Game/Databases/openrsc_tools.sql 2>/dev/null
|
||||||
|
|
||||||
import-website:
|
import-website:
|
||||||
#@docker exec -i $(shell docker-compose ps -q mysqldb) mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Website/openrsc_forum.sql 2>/dev/null
|
@docker exec -i $(shell sudo docker-compose ps -q mysqldb) mysql -u"$(MARIADB_ROOT_USER)" -p"$(MARIADB_ROOT_PASSWORD)" < Website/openrsc_forum.sql 2>/dev/null
|
||||||
|
|
||||||
|
import-ghost:
|
||||||
|
docker exec -i $(shell sudo docker-compose ps -q mysqldb) mysql -u"$(MARIADB_ROOT_USER)" -p"$(MARIADB_ROOT_PASSWORD)" < ghost.sql 2>/dev/null
|
||||||
|
|
||||||
import-wiki:
|
import-wiki:
|
||||||
#@docker exec -i $(shell docker-compose ps -q mysqldb) mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Website/Wiki/openrsc_wiki.sql 2>/dev/null
|
@docker exec -i $(shell sudo docker-compose ps -q mysqldb) mysql -u"$(MARIADB_ROOT_USER)" -p"$(MARIADB_ROOT_PASSWORD)" < Website/Wiki/openrsc_wiki.sql 2>/dev/null
|
||||||
|
|
||||||
import-windows-game:
|
import-windows-game:
|
||||||
@docker exec -i mysql mysql -u"root" -p"root" < Game/Databases/openrsc_logs.sql
|
@docker exec -i mysql mysql -u"root" -p"root" < Game/Databases/openrsc_logs.sql
|
||||||
@@ -87,13 +90,16 @@ import-windows-game:
|
|||||||
@docker exec -i mysql mysql -u"root" -p"root" < Game/Databases/openrsc_tools.sql
|
@docker exec -i mysql mysql -u"root" -p"root" < Game/Databases/openrsc_tools.sql
|
||||||
|
|
||||||
import-windows-website:
|
import-windows-website:
|
||||||
#@docker exec -i mysql mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Website/openrsc_forum.sql
|
@docker exec -i mysql mysql -u"$(MARIADB_ROOT_USER)" -p"$(MARIADB_ROOT_PASSWORD)" < Website/openrsc_forum.sql
|
||||||
|
|
||||||
|
import-windows-ghost:
|
||||||
|
@docker exec -i mysql mysql -u"$(MARIADB_ROOT_USER)" -p"$(MARIADB_ROOT_PASSWORD)" < ghost.sql
|
||||||
|
|
||||||
import-windows-wiki:
|
import-windows-wiki:
|
||||||
#@docker exec -i mysql mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Website/Wiki/openrsc_wiki.sql
|
@docker exec -i mysql mysql -u"$(MARIADB_ROOT_USER)" -p"$(MARIADB_ROOT_PASSWORD)" < Website/Wiki/openrsc_wiki.sql
|
||||||
|
|
||||||
flush:
|
flush:
|
||||||
@$(shell rm -rf Website && rm -rf Game)
|
@$(shell sudo rm -rf Website && sudo rm -rf Game)
|
||||||
|
|
||||||
flush-windows:
|
flush-windows:
|
||||||
@rmdir "Website" /s /Q
|
@rmdir "Website" /s /Q
|
||||||
|
|||||||
@@ -247,6 +247,7 @@ echo:
|
|||||||
echo Importing the game databases.
|
echo Importing the game databases.
|
||||||
echo:
|
echo:
|
||||||
make import-windows-game
|
make import-windows-game
|
||||||
|
make import-windows-ghost
|
||||||
echo:
|
echo:
|
||||||
echo:
|
echo:
|
||||||
goto final
|
goto final
|
||||||
|
|||||||
@@ -2,34 +2,24 @@ version: '3.1'
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:latest
|
image: bitnami/nginx:latest
|
||||||
container_name: nginx
|
container_name: nginx
|
||||||
volumes:
|
volumes:
|
||||||
- "./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf"
|
- "./etc/nginx:/opt/bitnami/nginx/conf/vhosts"
|
||||||
#- "./Website:/var/www/html/public"
|
- "./Website:/opt/bitnami/nginx/html"
|
||||||
- "./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template"
|
- "./etc/logs/nginx:/opt/bitnami/nginx/logs"
|
||||||
- "./etc/logs/nginx:/var/log/nginx"
|
#- "./etc/logs/letsencrypt:/var/log/letsencrypt"
|
||||||
- "./etc/logs/letsencrypt:/var/log/letsencrypt"
|
#- "./etc/letsencrypt/certs:/etc/letsencrypt"
|
||||||
- "./etc/letsencrypt/certs:/etc/letsencrypt"
|
#- "./etc/letsencrypt/data:/data/letsencrypt"
|
||||||
- "./etc/letsencrypt/data:/data/letsencrypt"
|
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:8080"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
environment:
|
environment:
|
||||||
- NGINX_HOST=${NGINX_HOST}
|
- NGINX_HOST=${NGINX_HOST}
|
||||||
command: /bin/sh -c "envsubst '$$NGINX_HOST' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
|
#- VIRTUAL_HOST=localhost
|
||||||
|
#- LETSENCRYPT_HOST=localhost
|
||||||
|
#- LETSENCRYPT_EMAIL=your.email@here.com
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
|
||||||
- mysqldb
|
|
||||||
- tomcat
|
|
||||||
# logging:
|
|
||||||
# driver: splunk
|
|
||||||
# options:
|
|
||||||
# splunk-token: "e1c56fa1-9f7c-4d2c-ba8f-989b15d85008"
|
|
||||||
# splunk-url: "https://127.0.0.1:8088"
|
|
||||||
# splunk-insecureskipverify: "true"
|
|
||||||
# tag: "{{.ImageName}}/{{.Name}}/{{.ID}}"
|
|
||||||
# labels: "Nginx"
|
|
||||||
|
|
||||||
myadmin:
|
myadmin:
|
||||||
image: phpmyadmin/phpmyadmin
|
image: phpmyadmin/phpmyadmin
|
||||||
@@ -42,40 +32,28 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysqldb
|
- mysqldb
|
||||||
# logging:
|
|
||||||
# driver: splunk
|
|
||||||
# options:
|
|
||||||
# splunk-token: "e1c56fa1-9f7c-4d2c-ba8f-989b15d85008"
|
|
||||||
# splunk-url: "https://127.0.0.1:8088"
|
|
||||||
# splunk-insecureskipverify: "true"
|
|
||||||
# tag: "{{.ImageName}}/{{.Name}}/{{.ID}}"
|
|
||||||
# labels: "PHPMyAdmin"
|
|
||||||
|
|
||||||
mysqldb:
|
mysqldb:
|
||||||
image: mariadb:10.3.8
|
image: bitnami/mariadb:latest
|
||||||
container_name: mysql
|
container_name: mysql
|
||||||
restart: always
|
restart: always
|
||||||
env_file:
|
env_file:
|
||||||
- ".env"
|
- ".env"
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
- MARIADB_DATABASE=${MARIADB_DATABASE}
|
||||||
- MYSQL_ROOT_USER=${MYSQL_ROOT_USER}
|
- MARIADB_ROOT_USER=${MARIADB_ROOT_USER}
|
||||||
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
|
||||||
- MYSQL_USER=${MYSQL_USER}
|
- ALLOW_EMPTY_PASSWORD=no
|
||||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
- MARIADB_USER=${MARIADB_USER}
|
||||||
|
- MARIADB_PASSWORD=${MARIADB_PASS}
|
||||||
|
- MARIADB_DATABASE=bitnami_ghost
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:3306:3306"
|
- "127.0.0.1:3306:3306"
|
||||||
volumes:
|
volumes:
|
||||||
- "./data/db/mysql:/var/lib/mysql"
|
- "./data/db/mysql:/bitnami/mariadb"
|
||||||
- "./etc/mariadb/innodb.cnf:/etc/mysql/conf.d/innodb.cnf:ro"
|
- "./etc/mariadb/innodb.cnf:/bitnami/mariadb/conf/innodb.cnf:ro"
|
||||||
# logging:
|
depends_on:
|
||||||
# driver: splunk
|
- nginx
|
||||||
# options:
|
|
||||||
# splunk-token: "e1c56fa1-9f7c-4d2c-ba8f-989b15d85008"
|
|
||||||
# splunk-url: "https://127.0.0.1:8088"
|
|
||||||
# splunk-insecureskipverify: "true"
|
|
||||||
# tag: "{{.ImageName}}/{{.Name}}/{{.ID}}"
|
|
||||||
# labels: "MySQL"
|
|
||||||
|
|
||||||
tomcat:
|
tomcat:
|
||||||
image: tomcat:latest
|
image: tomcat:latest
|
||||||
@@ -86,36 +64,47 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- "./Website:/usr/local/tomcat/webapps/ROOT"
|
- "./Website:/usr/local/tomcat/webapps/ROOT"
|
||||||
- "./etc/tomcat:/usr/local/tomcat/conf"
|
- "./etc/tomcat:/usr/local/tomcat/conf"
|
||||||
# logging:
|
depends_on:
|
||||||
# driver: splunk
|
- nginx
|
||||||
# options:
|
|
||||||
# splunk-token: "e1c56fa1-9f7c-4d2c-ba8f-989b15d85008"
|
|
||||||
# splunk-url: "https://127.0.0.1:8088"
|
|
||||||
# splunk-insecureskipverify: "true"
|
|
||||||
# tag: "{{.ImageName}}/{{.Name}}/{{.ID}}"
|
|
||||||
# labels: "Tomcat"
|
|
||||||
|
|
||||||
ghost:
|
ghost:
|
||||||
image: ghost:latest
|
image: bitnami/ghost:latest
|
||||||
container_name: ghost
|
container_name: ghost
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:2368:2368"
|
- "127.0.0.1:2368:2368"
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- "./etc/ghost:/var/lib/ghost/content"
|
- "./etc:/bitnami"
|
||||||
depends_on:
|
|
||||||
- nginx
|
|
||||||
env_file:
|
env_file:
|
||||||
- ".env"
|
- ".env"
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: production
|
- MARIADB_HOST=mysql
|
||||||
privacy__useUpdateCheck: 0
|
- MARIADB_PORT_NUMBER=3306
|
||||||
url: ${URL}
|
- GHOST_DATABASE_USER=${MARIADB_ROOT_USER}
|
||||||
# logging:
|
- GHOST_DATABASE_PASSWORD=${MARIADB_ROOT_PASSWORD}
|
||||||
# driver: splunk
|
- GHOST_DATABASE_NAME=${GHOST_DATABASE_NAME}
|
||||||
# options:
|
- ALLOW_EMPTY_PASSWORD=${ALLOW_EMPTY_PASSWORD}
|
||||||
# splunk-token: "e1c56fa1-9f7c-4d2c-ba8f-989b15d85008"
|
- GHOST_HOST=${GHOST_HOST}
|
||||||
# splunk-url: "https://127.0.0.1:8088"
|
- GHOST_EMAIL=${GHOST_EMAIL}
|
||||||
# splunk-insecureskipverify: "true"
|
- GHOST_PASSWORD=${GHOST_PASSWORD}
|
||||||
# tag: "{{.ImageName}}/{{.Name}}/{{.ID}}"
|
depends_on:
|
||||||
# labels: "Ghost"
|
- mysqldb
|
||||||
|
- nginx
|
||||||
|
|
||||||
|
php:
|
||||||
|
image: bitnami/php-fpm:latest
|
||||||
|
container_name: php
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "9001:9000"
|
||||||
|
volumes:
|
||||||
|
- "./etc/php/php.ini:/opt/bitnami/php/etc/conf.d/php.ini"
|
||||||
|
- "./Website:/app"
|
||||||
|
depends_on:
|
||||||
|
- nginx
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mariadb_data:
|
||||||
|
driver: local
|
||||||
|
ghost_data:
|
||||||
|
driver: local
|
||||||
|
|||||||
0
etc/ghost/.initialized
Normal file
0
etc/ghost/.restored
Normal file
29
etc/ghost/config.production.json
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"database": {
|
||||||
|
"client": "mysql",
|
||||||
|
"connection": {
|
||||||
|
"host": "mysql",
|
||||||
|
"port": 3306,
|
||||||
|
"password": "root",
|
||||||
|
"user": "root",
|
||||||
|
"database": "ghost"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"url": "http://localhost:2368/blog",
|
||||||
|
"server": {
|
||||||
|
"port": 2368,
|
||||||
|
"host": "0.0.0.0"
|
||||||
|
},
|
||||||
|
"mail": {
|
||||||
|
"transport": "Direct"
|
||||||
|
},
|
||||||
|
"logging": {
|
||||||
|
"transports": [
|
||||||
|
"file"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"process": "local",
|
||||||
|
"paths": {
|
||||||
|
"contentPath": "/opt/bitnami/ghost/content"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
BIN
etc/ghost/content/images/2018/08/2-2.png
Normal file
|
After Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
BIN
etc/ghost/content/images/2018/08/41124845.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 422 KiB After Width: | Height: | Size: 422 KiB |
|
After Width: | Height: | Size: 784 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 468 KiB |
|
After Width: | Height: | Size: 468 KiB |
|
After Width: | Height: | Size: 648 KiB |
|
After Width: | Height: | Size: 363 KiB |
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 87 KiB |
BIN
etc/ghost/content/images/2018/08/cat.jpg
Normal file
|
After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 172 KiB |
BIN
etc/ghost/content/images/2018/08/homework.jpg
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
etc/ghost/content/images/2018/08/lol.png
Normal file
|
After Width: | Height: | Size: 169 KiB |
BIN
etc/ghost/content/images/2018/08/map.png
Normal file
|
After Width: | Height: | Size: 322 KiB |
|
Before Width: | Height: | Size: 371 KiB After Width: | Height: | Size: 371 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
BIN
etc/ghost/content/images/2018/08/project-1.png
Normal file
|
After Width: | Height: | Size: 334 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 693 KiB After Width: | Height: | Size: 693 KiB |
BIN
etc/ghost/content/images/2018/08/wod.png
Normal file
|
After Width: | Height: | Size: 693 KiB |
1
etc/ghost/content/logs
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
/opt/bitnami/ghost/logs
|
||||||
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
1
etc/ghost/content/themes/casper
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
/opt/bitnami/ghost/current/content/themes/casper
|
||||||
29
etc/ghost/ghost/config.production.json
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"database": {
|
||||||
|
"client": "mysql",
|
||||||
|
"connection": {
|
||||||
|
"host": "mysql",
|
||||||
|
"port": 3306,
|
||||||
|
"password": "root",
|
||||||
|
"user": "root",
|
||||||
|
"database": "ghost"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"url": "http://localhost:2368/blog",
|
||||||
|
"server": {
|
||||||
|
"port": 2368,
|
||||||
|
"host": "0.0.0.0"
|
||||||
|
},
|
||||||
|
"mail": {
|
||||||
|
"transport": "Direct"
|
||||||
|
},
|
||||||
|
"logging": {
|
||||||
|
"transports": [
|
||||||
|
"file"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"process": "local",
|
||||||
|
"paths": {
|
||||||
|
"contentPath": "/opt/bitnami/ghost/content"
|
||||||
|
}
|
||||||
|
}
|
||||||
119
etc/nginx/HTTPS_default.conf.BAK
Executable file
@@ -0,0 +1,119 @@
|
|||||||
|
upstream tomcat {
|
||||||
|
server tomcat:8080;
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream ghost {
|
||||||
|
server ghost:2368;
|
||||||
|
}
|
||||||
|
|
||||||
|
# HTTP
|
||||||
|
server {
|
||||||
|
listen 8080 default_server;
|
||||||
|
listen [::]:8080 default_server ipv6only=on;
|
||||||
|
server_name ${NGINX_HOST};
|
||||||
|
|
||||||
|
error_log /opt/bitnami/nginx/logs/error.log;
|
||||||
|
access_log /opt/bitnami/nginx/logs/access.log;
|
||||||
|
|
||||||
|
rewrite ^ https://$http_host$request_uri? permanent; #Redirect traffic to HTTPS
|
||||||
|
|
||||||
|
root /app;
|
||||||
|
index index.html index.htm index.php index.jsp;
|
||||||
|
|
||||||
|
client_max_body_size 100M;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
####### Proxies #######
|
||||||
|
# PHP proxy
|
||||||
|
location ~ \.php$ {
|
||||||
|
fastcgi_pass php:9001;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
include fastcgi.conf;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 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 ~ \.(do|jspa|obr|jsp|txt|zip) {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# HTTPS
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
listen [::]:443 ssl http2;
|
||||||
|
server_name ${NGINX_HOST};
|
||||||
|
|
||||||
|
error_log /opt/bitnami/nginx/logs/error.log;
|
||||||
|
access_log /opt/bitnami/nginx/logs/access.log;
|
||||||
|
|
||||||
|
add_header Strict-Transport-Security "max-age=31536000" always;
|
||||||
|
ssl_session_cache shared:SSL:20m;
|
||||||
|
ssl_session_timeout 10m;
|
||||||
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
ssl_ciphers "ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!ADH:!AECDH:!MD5;";
|
||||||
|
ssl_stapling on;
|
||||||
|
ssl_stapling_verify on;
|
||||||
|
resolver 8.8.8.8 1.1.1.1;
|
||||||
|
ssl_certificate /etc/letsencrypt/live/${NGINX_HOST}/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/${NGINX_HOST}/privkey.pem;
|
||||||
|
ssl_trusted_certificate /etc/letsencrypt/live/${NGINX_HOST}/chain.pem;
|
||||||
|
|
||||||
|
root /app;
|
||||||
|
index index.html index.htm index.php index.jsp;
|
||||||
|
|
||||||
|
client_max_body_size 100M;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
####### Proxies #######
|
||||||
|
# PHP proxy
|
||||||
|
location ~ \.php$ {
|
||||||
|
fastcgi_pass php:9001;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
include fastcgi.conf;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 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 ~ \.(do|jspa|obr|jsp|txt|zip) {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Certbot for HTTPS cert renewal
|
||||||
|
location ~ ^/.well-known {
|
||||||
|
root /data/letsencrypt/;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||