-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from wetfish/fix_dockerized_url
Fix dockerized url
- Loading branch information
Showing
9 changed files
with
2,305 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
DB_PASSWORD=secret | ||
DB_DATABASE=forums | ||
DB_USERNAME=forums | ||
|
||
# Set to 1 to enable maintenance mode, 2 to make it immutable | ||
MAINTENANCE_MODE=0 | ||
MAINTENANCE_TITLE="Maintenance Mode" | ||
MAINTENANCE_MESSAGE="Okay faithful users...we're attempting to restore an older backup of the database...news will be posted once we're back" | ||
|
||
SITE_NAME=forums | ||
SITE_LANGUAGE=english | ||
|
||
# These sites are expected to live at your.url/forum, please make sure your url has the correct structure | ||
SITE_URL=https://staging.wetfishonline.com/forum | ||
|
||
OUTGOING_EMAIL=noreply@yourdomain.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
server { | ||
listen 80; | ||
|
||
index index.php index.html; | ||
error_log /var/log/nginx/error.log; | ||
access_log /var/log/nginx/access.log; | ||
|
||
root /var/www; | ||
location /forum/ { } | ||
|
||
location = / { | ||
rewrite ^/(.*)$ /forum/$1 redirect; | ||
} | ||
|
||
location ~ \.php$ { | ||
try_files $uri =404; | ||
fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
fastcgi_pass forum:9000; | ||
fastcgi_index index.php; | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
php_admin_flag[log_errors] = on | ||
php_admin_value[error_log] = /var/www/forum/errors.log | ||
catch_workers_output = yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
date.timezone = UTC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
version: '3' | ||
services: | ||
|
||
#PHP Service | ||
forum: | ||
image: fishnet/online | ||
container_name: forum-php | ||
restart: unless-stopped | ||
tty: true | ||
working_dir: /var/www/forum | ||
env_file: | ||
- ./.env | ||
volumes: | ||
- ./forum:/var/www/forum | ||
- ./utils:/var/www/utils | ||
- ./config/php.ini:/usr/local/etc/php/conf.d/settings.ini | ||
- ./config/php.conf:/usr/local/etc/php-fpm.d/zz-php.conf | ||
networks: | ||
- forum-network | ||
depends_on: | ||
- db | ||
|
||
webserver: | ||
image: nginx:alpine | ||
container_name: forum-nginx | ||
restart: unless-stopped | ||
ports: | ||
- "80:80" | ||
volumes: | ||
- ./forum:/var/www/forum | ||
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf | ||
networks: | ||
- forum-network | ||
depends_on: | ||
- db | ||
- forum | ||
|
||
##SSL-enabled Nginx Service; uncomment to use | ||
##Make sure to comment out the above webserver block | ||
#webserver: | ||
# image: ghcr.io/linuxserver/swag | ||
# container_name: swag | ||
# restart: unless-stopped | ||
# environment: | ||
# PUID: 1000 | ||
# PGID: 1000 | ||
# TZ: $TIMEZONE | ||
# URL: $SITE_URL | ||
# SUBDOMAINS: $SUBDOMAINS | ||
# ONLY_SUBDOMAINS: $ONLY_SUBDOMAINS | ||
# VALIDATION: http | ||
# EMAIL: $EMAIL # optional | ||
# ports: | ||
# - "80:80" | ||
# - "443:443" | ||
# volumes: | ||
# - ./swag/site-confs:/config/nginx/site-confs | ||
# - ./swag/fastcgi_params:/config/nginx/fastcgi_params | ||
# - ./laravel/:/config/www | ||
# - config:/config | ||
# networks: | ||
# - forum-network | ||
# depends_on: | ||
# - db | ||
# - forum | ||
|
||
# MySQL Service | ||
db: | ||
image: mariadb | ||
container_name: forum-mysql | ||
restart: unless-stopped | ||
command: --sql_mode="" | ||
environment: | ||
MYSQL_ROOT_PASSWORD: $DB_PASSWORD | ||
MYSQL_DATABASE: $DB_DATABASE | ||
MYSQL_USER: $DB_USERNAME | ||
MYSQL_PASSWORD: $DB_PASSWORD | ||
volumes: | ||
- ./config/docker.sql:/docker-entrypoint-initdb.d/setup.sql | ||
- dbdata:/var/lib/mysql | ||
networks: | ||
- forum-network | ||
|
||
#Docker Networks | ||
networks: | ||
forum-network: | ||
driver: bridge | ||
|
||
#Volumes | ||
volumes: | ||
dbdata: | ||
driver: local | ||
node_modules: | ||
driver: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM php:5.6-fpm-stretch | ||
|
||
# Check what we need from staging here, build out php extensions | ||
RUN apt-get update && apt-get install -y \ | ||
apt-utils \ | ||
libpng-dev \ | ||
libfreetype6-dev \ | ||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/freetype2/ \ | ||
&& docker-php-ext-configure calendar \ | ||
&& docker-php-ext-install calendar exif gd gettext mysql mysqli pdo_mysql | ||
|
||
RUN useradd fishy | ||
COPY --chown=fishy:fishy . /var/www/forum | ||
|
||
USER fishy | ||
|
||
EXPOSE 9000 | ||
CMD ["php-fpm"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
|
||
/** | ||
* Simple Machines Forum (SMF) | ||
* | ||
* @package SMF | ||
* @author Simple Machines http://www.simplemachines.org | ||
* @copyright 2011 Simple Machines | ||
* @license http://www.simplemachines.org/about/smf/license.php BSD | ||
* | ||
* @version 2.0 | ||
*/ | ||
|
||
########## Maintenance ########## | ||
# Note: If $maintenance is set to 2, the forum will be unusable! Change it to 0 to fix it. | ||
$maintenance = getenv('MAINTENANCE_MODE'); # Set to 1 to enable Maintenance Mode, 2 to make the forum untouchable. (you'll have to make it 0 again manually!) | ||
$mtitle = getenv('MAINTENANCE_TITLE'); # Title for the Maintenance Mode message. | ||
$mmessage = getenv('MAINTENANCE_MESSAGE'); # Description of why the forum is in maintenance mode. | ||
|
||
########## Forum Info ########## | ||
$mbname = getenv('SITE_NAME'); # The name of your forum. | ||
$language = getenv('SITE_LANGUAGE'); # The default language file set for the forum. | ||
$boardurl = getenv('SITE_URL'); # URL to your forum's folder. (without the trailing /!) | ||
$webmaster_email = getenv('OUTGOING_EMAIL'); # Email address to send emails from. (like noreply@yourdomain.com.) | ||
$cookiename = 'SMFCookie11'; # Name of the cookie to set for authentication. | ||
|
||
########## Database Info ########## | ||
$db_type = 'mysql'; | ||
$db_server = 'db'; | ||
$db_name = getenv('DB_DATABASE'); | ||
$db_user = getenv('DB_USERNAME'); | ||
$db_passwd = getenv('DB_PASSWORD'); | ||
$ssi_db_user = ''; | ||
$ssi_db_passwd = ''; | ||
$db_prefix = 'smf_'; | ||
$db_persist = 0; | ||
$db_error_send = 1; | ||
|
||
########## Directories/Files ########## | ||
# Note: These directories do not have to be changed unless you move things. | ||
$boarddir = '/home/halfwit/online/forum'; # The absolute path to the forum's folder. (not just '.'!) | ||
$sourcedir = '/home/halfwit/online/forum/Sources'; # Path to the Sources directory. | ||
$cachedir = '/home/halfwit/online/forum/cache'; # Path to the cache directory. | ||
|
||
########## Error-Catching ########## | ||
# Note: You shouldn't touch these settings. | ||
$db_last_error = 0; | ||
|
||
# Make sure the paths are correct... at least try to fix them. | ||
|
||
if (!file_exists($boarddir) && file_exists(dirname(__FILE__) . '/agreement.txt')) | ||
$boarddir = dirname(__FILE__); | ||
if (!file_exists($sourcedir) && file_exists($boarddir . '/Sources')) | ||
$sourcedir = $boarddir . '/Sources'; | ||
if (!file_exists($cachedir) && file_exists($boarddir . '/cache')) | ||
$cachedir = $boarddir . '/cache'; | ||
|
||
?> |