Changes to support new design
This commit is contained in:
1
.env
1
.env
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Ghost
|
||||
GHOST_HOST=localhost/ghost
|
||||
GHOST_EMAIL=admin@openrsc.com
|
||||
GHOST_PASSWORD=malwareinfection
|
||||
GHOST_DATABASE_NAME=ghost
|
||||
|
||||
@@ -547,32 +547,43 @@ elif [ "$choice" == "2" ]; then
|
||||
unzip -o Game/client/cache.zip -d ~/OpenRSC
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Importing the databases."
|
||||
echo ""
|
||||
sudo make import-game
|
||||
sudo make import-ghost
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Creating a backup of your current databases as \"Docker-Home/data/db/db.sql\""
|
||||
echo ""
|
||||
sudo make backup
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Next is manual file editing for the website domain and SQL user/pass."
|
||||
echo ""
|
||||
echo "It is suggested that you first navigate to your VPS's http://domain:9000"
|
||||
echo ""
|
||||
echo "Create a new SQL user and password, grant all permissions, then remove the others."
|
||||
echo ""
|
||||
echo ""
|
||||
echo "When finished, it will be time to edit the files that rely on that new SQL user."
|
||||
echo ""
|
||||
echo "(Use Ctrl + X to save each file when done editing) - Press enter when ready."
|
||||
read next
|
||||
sudo nano .env
|
||||
sudo nano Game/client/src/org/openrsc/client/Config.java
|
||||
sudo nano Game/Launcher/src/Main.java
|
||||
sudo nano Game/server/config/config.xml
|
||||
sudo nano etc/ghost/config.production.json
|
||||
echo ""
|
||||
echo ""
|
||||
echo "File edits complete. Restarting Docker containers."
|
||||
echo "File edits complete."
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Importing the databases."
|
||||
echo ""
|
||||
sudo make import-game
|
||||
sudo make import-ghost
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Restarting Docker containers"
|
||||
echo ""
|
||||
sudo make stop && sudo make start
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Creating a backup of your current databases as \"Docker-Home/data/db/db.sql\""
|
||||
echo ""
|
||||
sudo make backup
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Ready to launch \"./Linux_Fetch_Updates_Production.sh\" - Press enter when ready."
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
@@ -38,7 +38,9 @@ services:
|
||||
user: root
|
||||
command: chown -R 1001:1001 /bitnami
|
||||
volumes:
|
||||
- "./data/db/mysq:/bitnami/mariadb"
|
||||
- "./data/db/mysq:/bitnami/mariadb"
|
||||
depends_on:
|
||||
- nginx
|
||||
|
||||
mysqldb:
|
||||
image: bitnami/mariadb:latest
|
||||
@@ -60,7 +62,7 @@ services:
|
||||
- "./data/db/mysq:/bitnami/mariadb"
|
||||
- "./etc/mariadb/innodb.cnf:/bitnami/mariadb/conf/innodb.cnf:ro"
|
||||
depends_on:
|
||||
- nginx
|
||||
- fix-mariadb-permissions
|
||||
|
||||
tomcat:
|
||||
image: tomcat:latest
|
||||
@@ -79,7 +81,10 @@ services:
|
||||
user: root
|
||||
command: chown -R 1001:1001 /bitnami/ghost
|
||||
volumes:
|
||||
- "./etc/ghost:/bitnami/ghost"
|
||||
- "./etc/ghost:/bitnami/ghost"
|
||||
depends_on:
|
||||
- mysqldb
|
||||
- nginx
|
||||
|
||||
ghost:
|
||||
image: bitnami/ghost:latest
|
||||
@@ -98,12 +103,10 @@ services:
|
||||
- GHOST_DATABASE_PASSWORD=${MARIADB_ROOT_PASSWORD}
|
||||
- GHOST_DATABASE_NAME=${GHOST_DATABASE_NAME}
|
||||
- ALLOW_EMPTY_PASSWORD=${ALLOW_EMPTY_PASSWORD}
|
||||
- GHOST_HOST=${GHOST_HOST}
|
||||
- GHOST_EMAIL=${GHOST_EMAIL}
|
||||
- GHOST_PASSWORD=${GHOST_PASSWORD}
|
||||
depends_on:
|
||||
- mysqldb
|
||||
- nginx
|
||||
- fix-ghost-permissions
|
||||
|
||||
php:
|
||||
image: bitnami/php-fpm:latest
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"database": "ghost"
|
||||
}
|
||||
},
|
||||
"url": "http://localhost:2368/blog",
|
||||
"url": "http://localhost/blog",
|
||||
"server": {
|
||||
"port": 2368,
|
||||
"host": "0.0.0.0"
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@@ -17,41 +17,6 @@ server {
|
||||
|
||||
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
|
||||
@@ -77,20 +42,21 @@ server {
|
||||
ssl_trusted_certificate /etc/letsencrypt/live/${NGINX_HOST}/chain.pem;
|
||||
|
||||
root /app;
|
||||
index index.html index.htm index.php index.jsp;
|
||||
index index.jsp index.html index.htm index.php;
|
||||
|
||||
client_max_body_size 100M;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/index.html;
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
####### Proxies #######
|
||||
# PHP proxy
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass php:9001;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi.conf;
|
||||
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://php;
|
||||
}
|
||||
|
||||
# Ghost proxy
|
||||
@@ -104,7 +70,7 @@ server {
|
||||
}
|
||||
|
||||
# Tomcat proxy
|
||||
location ~ \.(do|jspa|obr|jsp|txt|zip) {
|
||||
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;
|
||||
|
||||
@@ -15,15 +15,13 @@ server {
|
||||
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;
|
||||
index index.jsp index.html index.htm index.php;
|
||||
|
||||
client_max_body_size 100M;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/index.html;
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
####### Proxies #######
|
||||
@@ -45,7 +43,7 @@ server {
|
||||
}
|
||||
|
||||
# Tomcat proxy
|
||||
location ~ \.(do|jspa|obr|jsp|txt|zip) {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user