commit 06093a8558c46802c0e6e1a9bd69930e018a2ed1 Author: brooke Date: Sat Oct 21 23:55:49 2023 -0400 initial commit diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..98fbdb5 --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +MYSQL_DATABASE: +MYSQL_USER: +MYSQL_PASSWORD: diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1d6dcec --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +xenforo/ +mysql/ +.env diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..43fa8cd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM php:8.1-fpm-alpine3.16 + +RUN apk update + +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ + +RUN chmod +x /usr/local/bin/install-php-extensions && \ + install-php-extensions gd xdebug mysqli imagick gmp diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..24c9520 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,33 @@ +version: "3" + +services: + php: + build: + context: ./ + dockerfile: Dockerfile + volumes: + - /home/debian/docker/xenforo/_data:/var/www/html/ + + web: + image: nginx + ports: + - "8080:80" + volumes: + - /home/debian/docker/xenforo/_data:/var/www/html/ + - ./stp.conf:/etc/nginx/conf.d/stp.conf + links: + - php + + mysql: + image: mariadb + environment: + MYSQL_RANDOM_ROOT_PASSWORD: "yes" + MYSQL_DATABASE: ${MYSQL_DATABASE} + MYSQL_USER: ${MYSQL_USER} + MYSQL_PASSWORD: ${MYSQL_PASSWORD} + links: + - web + ports: + - "3306:3306" + volumes: + - /home/debian/docker/mysql/_data:/var/lib/mysql diff --git a/stp.conf b/stp.conf new file mode 100644 index 0000000..e46effd --- /dev/null +++ b/stp.conf @@ -0,0 +1,49 @@ +server { + listen 80; + server_name squattheplanet.com www.squattheplanet.com; + + client_max_body_size 512M; + + add_header X-Xss-Protection "1; mode=block" always; + add_header X-Content-Type-Options "nosniff" always; + + root /var/www/html; + + location / { + index index.php index.html index.htm; + try_files $uri $uri/ /index.php?$uri&$args; + } + + location /install/data/ { + internal; + } + + location /install/templates/ { + internal; + } + + location /internal_data/ { + internal; + } + + location /library/ { + internal; + } + + location /src/ { + internal; + } + + rewrite ^/chat(.*)$ https://discordapp.com/invite/R6Hwjmh permanent; + rewrite ^/shop(.*)$ https://www.etsy.com/shop/SquatThePlanet permanent; + + 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; + } +}