Cleanup, wiki add
This commit is contained in:
8
.env
8
.env
@@ -1,17 +1,15 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# See https://docs.docker.com/compose/environment-variables/#the-env-file
|
# See https://docs.docker.com/compose/environment-variables/#the-env-file
|
||||||
|
|
||||||
# Nginx
|
# Nginx
|
||||||
NGINX_HOST=localhost
|
NGINX_HOST=localhost
|
||||||
|
|
||||||
# PHP
|
# PHP
|
||||||
|
|
||||||
# See https://hub.docker.com/r/nanoninja/php-fpm/tags/
|
# See https://hub.docker.com/r/nanoninja/php-fpm/tags/
|
||||||
PHP_VERSION=latest
|
PHP_VERSION=7.2
|
||||||
|
|
||||||
# MySQL
|
# MariaDB
|
||||||
MYSQL_VERSION=5.7.22
|
MARIADB_VERSION=10.3.8
|
||||||
MYSQL_HOST=mysql
|
MYSQL_HOST=mysql
|
||||||
MYSQL_DATABASE=test
|
MYSQL_DATABASE=test
|
||||||
MYSQL_ROOT_USER=root
|
MYSQL_ROOT_USER=root
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -8,6 +8,9 @@ Website
|
|||||||
# Game
|
# Game
|
||||||
Game
|
Game
|
||||||
|
|
||||||
|
# Wiki
|
||||||
|
Wiki
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
data
|
data
|
||||||
|
|
||||||
|
|||||||
@@ -18,15 +18,20 @@ echo:
|
|||||||
Windows\make start
|
Windows\make start
|
||||||
|
|
||||||
cls
|
cls
|
||||||
echo Downloading a copy of the Open-RSC Website repository
|
echo Downloading a copy of the Website repository
|
||||||
echo:
|
echo:
|
||||||
Windows\make clone-windows-website
|
Windows\make clone-windows-website
|
||||||
|
|
||||||
cls
|
cls
|
||||||
echo Downloading a copy of the Open-RSC Game repository
|
echo Downloading a copy of the Game repository
|
||||||
echo:
|
echo:
|
||||||
Windows\make clone-windows-game
|
Windows\make clone-windows-game
|
||||||
|
|
||||||
|
cls
|
||||||
|
echo Downloading a copy of the Wiki repository
|
||||||
|
echo:
|
||||||
|
Windows\make clone-windows-wiki
|
||||||
|
|
||||||
cls
|
cls
|
||||||
echo Importing the databases.
|
echo Importing the databases.
|
||||||
echo:
|
echo:
|
||||||
|
|||||||
41
Makefile
41
Makefile
@@ -1,28 +1,6 @@
|
|||||||
# Makefile for Docker Nginx PHP Composer MySQL
|
|
||||||
|
|
||||||
include .env
|
include .env
|
||||||
|
|
||||||
# MySQL
|
|
||||||
MYSQL_DUMPS_DIR=./data/db
|
MYSQL_DUMPS_DIR=./data/db
|
||||||
|
|
||||||
help:
|
|
||||||
@echo ""
|
|
||||||
@echo "usage: make COMMAND"
|
|
||||||
@echo ""
|
|
||||||
@echo "Commands:"
|
|
||||||
@echo " first Perform first time setup"
|
|
||||||
@echo " clone Clone the git repository folders"
|
|
||||||
@echo " pull Get the latest git repository updates"
|
|
||||||
@echo " start Create and start containers"
|
|
||||||
@echo " stop Stop all containers"
|
|
||||||
@echo " restart Restart all containers"
|
|
||||||
@echo " logs Display log output"
|
|
||||||
@echo " import Import all databases from git repositories"
|
|
||||||
@echo " backup Create backup of all local databases"
|
|
||||||
@echo " restore Restore backup of all local databases"
|
|
||||||
@echo " flush Delete local git repository folders"
|
|
||||||
@echo ""
|
|
||||||
|
|
||||||
start: init
|
start: init
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
|
|
||||||
@@ -36,23 +14,29 @@ restart: init
|
|||||||
clone:
|
clone:
|
||||||
@$(shell git clone https://github.com/Open-RSC/Website.git)
|
@$(shell git clone https://github.com/Open-RSC/Website.git)
|
||||||
@$(shell git clone https://github.com/Open-RSC/Game.git)
|
@$(shell git clone https://github.com/Open-RSC/Game.git)
|
||||||
@$(shell sudo chmod -R 777 Website && sudo chmod -R 777 Game && sudo chmod 644 Website/board/config.php)
|
@$(shell git clone https://github.com/Open-RSC/Wiki.git)
|
||||||
|
#@$(shell sudo chmod -R 777 Website && sudo chmod -R 777 Game && sudo chmod 644 Website/board/config.php)
|
||||||
|
|
||||||
clone-windows-website:
|
clone-windows-website:
|
||||||
@git clone https://github.com/Open-RSC/Website.git
|
@git clone https://github.com/Open-RSC/Website.git
|
||||||
#icacls Website/Open-RSC-Website /grant Everyone:F /t
|
#icacls Website /grant Everyone:F /t
|
||||||
|
|
||||||
clone-windows-game:
|
clone-windows-game:
|
||||||
@git clone https://github.com/Open-RSC/Game.git
|
@git clone https://github.com/Open-RSC/Game.git
|
||||||
#icacls Game/Open-RSC-Game /grant Everyone:F /t
|
#icacls Game /grant Everyone:F /t
|
||||||
|
|
||||||
|
clone-windows-wiki:
|
||||||
|
@git clone https://github.com/Open-RSC/Wiki.git
|
||||||
|
|
||||||
pull:
|
pull:
|
||||||
@$(shell cd Website && git pull)
|
@$(shell cd Website && git pull)
|
||||||
@$(shell cd Game && git pull)
|
@$(shell cd Game && git pull)
|
||||||
|
@$(shell cd Wiki && git pull)
|
||||||
|
|
||||||
pull-windows:
|
pull-windows:
|
||||||
@cd Website && git pull
|
@cd Website && git pull
|
||||||
@cd Game && git pull
|
@cd Game && git pull
|
||||||
|
@cd Wiki && git pull
|
||||||
|
|
||||||
logs:
|
logs:
|
||||||
@docker-compose logs -f
|
@docker-compose logs -f
|
||||||
@@ -76,18 +60,21 @@ import:
|
|||||||
@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 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 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 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 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 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 docker-compose ps -q mysqldb) mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Wiki/openrsc_wiki.sql 2>/dev/null
|
||||||
|
|
||||||
import-windows:
|
import-windows:
|
||||||
@docker exec -i mysql mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Website/openrsc_forum.sql
|
|
||||||
@docker exec -i mysql mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Game/Databases/openrsc_logs.sql
|
@docker exec -i mysql mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Game/Databases/openrsc_logs.sql
|
||||||
@docker exec -i mysql mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Game/Databases/openrsc_config.sql
|
@docker exec -i mysql mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Game/Databases/openrsc_config.sql
|
||||||
@docker exec -i mysql mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Game/Databases/openrsc.sql
|
@docker exec -i mysql mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Game/Databases/openrsc.sql
|
||||||
|
@docker exec -i mysql mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Website/openrsc_forum.sql
|
||||||
|
@docker exec -i mysql mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Wiki/openrsc_wiki.sql
|
||||||
|
|
||||||
flush:
|
flush:
|
||||||
@$(shell rm -rf Website && rm -rf Game)
|
@$(shell rm -rf Website && rm -rf Game && rm -rf Wiki)
|
||||||
|
|
||||||
flush-windows:
|
flush-windows:
|
||||||
@rmdir "Website" /s /Q
|
@rmdir "Website" /s /Q
|
||||||
@rmdir "Game" /s /Q
|
@rmdir "Game" /s /Q
|
||||||
|
@rmdir "Wiki" /s /Q
|
||||||
|
|
||||||
.PHONY: clean test code-sniff init
|
.PHONY: clean test code-sniff init
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ services:
|
|||||||
- "./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf"
|
- "./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf"
|
||||||
- "./etc/ssl:/etc/ssl"
|
- "./etc/ssl:/etc/ssl"
|
||||||
- "./Website:/var/www/html/public"
|
- "./Website:/var/www/html/public"
|
||||||
|
- "./Wiki:/var/www/html/public/wiki"
|
||||||
- "./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template"
|
- "./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template"
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
@@ -23,6 +24,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini"
|
- "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini"
|
||||||
- "./Website:/var/www/html/public"
|
- "./Website:/var/www/html/public"
|
||||||
|
- "./Wiki:/var/www/html/public/wiki"
|
||||||
myadmin:
|
myadmin:
|
||||||
image: phpmyadmin/phpmyadmin
|
image: phpmyadmin/phpmyadmin
|
||||||
container_name: phpmyadmin
|
container_name: phpmyadmin
|
||||||
@@ -35,7 +37,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- mysqldb
|
- mysqldb
|
||||||
mysqldb:
|
mysqldb:
|
||||||
image: mariadb:latest
|
image: mariadb:${MARIADB_VERSION}
|
||||||
container_name: ${MYSQL_HOST}
|
container_name: ${MYSQL_HOST}
|
||||||
restart: always
|
restart: always
|
||||||
env_file:
|
env_file:
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ server_tokens off;
|
|||||||
add_header X-XSS-Protection "1; mode=block";
|
add_header X-XSS-Protection "1; mode=block";
|
||||||
add_header X-Content-Type-Options nosniff;
|
add_header X-Content-Type-Options nosniff;
|
||||||
|
|
||||||
|
# Website and PHPBB forum over HTTP
|
||||||
server {
|
server {
|
||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
listen [::]:80 default_server;
|
listen [::]:80 default_server;
|
||||||
@@ -19,16 +20,6 @@ server {
|
|||||||
root /var/www/html/public;
|
root /var/www/html/public;
|
||||||
index index.php index.html index.htm;
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
location ~ \.php$ {
|
|
||||||
try_files $uri =404;
|
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
||||||
fastcgi_pass php:9000;
|
|
||||||
fastcgi_index index.php;
|
|
||||||
include fastcgi_params;
|
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ /\.ht {
|
location ~ /\.ht {
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
@@ -87,7 +78,8 @@ server {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# server { #SSL configuration below
|
# Website and PHPBB forum over HTTP
|
||||||
|
# server {
|
||||||
# server_name localhost;
|
# server_name localhost;
|
||||||
|
|
||||||
# listen 443 ssl;
|
# listen 443 ssl;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ server_tokens off;
|
|||||||
add_header X-XSS-Protection "1; mode=block";
|
add_header X-XSS-Protection "1; mode=block";
|
||||||
add_header X-Content-Type-Options nosniff;
|
add_header X-Content-Type-Options nosniff;
|
||||||
|
|
||||||
|
# Website and PHPBB forum over HTTP
|
||||||
server {
|
server {
|
||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
listen [::]:80 default_server;
|
listen [::]:80 default_server;
|
||||||
@@ -19,16 +20,6 @@ server {
|
|||||||
root /var/www/html/public;
|
root /var/www/html/public;
|
||||||
index index.php index.html index.htm;
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
location ~ \.php$ {
|
|
||||||
try_files $uri =404;
|
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
||||||
fastcgi_pass php:9000;
|
|
||||||
fastcgi_index index.php;
|
|
||||||
include fastcgi_params;
|
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ /\.ht {
|
location ~ /\.ht {
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
@@ -87,7 +78,8 @@ server {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# server { #SSL configuration below
|
# Website and PHPBB forum over HTTP
|
||||||
|
# server {
|
||||||
# server_name ${NGINX_HOST};
|
# server_name ${NGINX_HOST};
|
||||||
|
|
||||||
# listen 443 ssl;
|
# listen 443 ssl;
|
||||||
|
|||||||
Reference in New Issue
Block a user