initial commit

This commit is contained in:
brooke 2023-10-21 23:55:49 -04:00
commit 06093a8558
6 changed files with 96 additions and 0 deletions

3
.env.example Normal file
View file

@ -0,0 +1,3 @@
MYSQL_DATABASE:
MYSQL_USER:
MYSQL_PASSWORD:

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
xenforo/
mysql/
.env

8
Dockerfile Normal file
View file

@ -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

0
README.md Normal file
View file

33
docker-compose.yml Normal file
View file

@ -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

49
stp.conf Normal file
View file

@ -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;
}
}