Skip to content

Commit 1547f0d

Browse files
committed
initial commit
0 parents  commit 1547f0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2897
-0
lines changed

Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Coding and Community public website
2+
# #C&&C
3+
#
4+
# - Keep all themes/plugins/etc
5+
# in the dockerfile build, to
6+
# update wordpress, rebuild the
7+
# docker image
8+
FROM wordpress:latest
9+
10+
COPY ./wp-config.php /var/www/html/wp-config.php
11+
12+
RUN ls /usr/src/wordpress
13+
14+
COPY copywp.sh .
15+
16+
RUN sh copywp.sh
17+
18+
COPY ./wp-content /var/www/html/wp-content

apache2.conf

+229
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
# This is the main Apache server configuration file. It contains the
2+
# configuration directives that give the server its instructions.
3+
# See http://httpd.apache.org/docs/2.4/ for detailed information about
4+
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
5+
# hints.
6+
#
7+
#
8+
# Summary of how the Apache 2 configuration works in Debian:
9+
# The Apache 2 web server configuration in Debian is quite different to
10+
# upstream's suggested way to configure the web server. This is because Debian's
11+
# default Apache2 installation attempts to make adding and removing modules,
12+
# virtual hosts, and extra configuration directives as flexible as possible, in
13+
# order to make automating the changes and administering the server as easy as
14+
# possible.
15+
16+
# It is split into several files forming the configuration hierarchy outlined
17+
# below, all located in the /etc/apache2/ directory:
18+
#
19+
# /etc/apache2/
20+
# |-- apache2.conf
21+
# | `-- ports.conf
22+
# |-- mods-enabled
23+
# | |-- *.load
24+
# | `-- *.conf
25+
# |-- conf-enabled
26+
# | `-- *.conf
27+
# `-- sites-enabled
28+
# `-- *.conf
29+
#
30+
#
31+
# * apache2.conf is the main configuration file (this file). It puts the pieces
32+
# together by including all remaining configuration files when starting up the
33+
# web server.
34+
#
35+
# * ports.conf is always included from the main configuration file. It is
36+
# supposed to determine listening ports for incoming connections which can be
37+
# customized anytime.
38+
#
39+
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
40+
# directories contain particular configuration snippets which manage modules,
41+
# global configuration fragments, or virtual host configurations,
42+
# respectively.
43+
#
44+
# They are activated by symlinking available configuration files from their
45+
# respective *-available/ counterparts. These should be managed by using our
46+
# helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
47+
# their respective man pages for detailed information.
48+
#
49+
# * The binary is called apache2. Due to the use of environment variables, in
50+
# the default configuration, apache2 needs to be started/stopped with
51+
# /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
52+
# work with the default configuration.
53+
54+
55+
# Global configuration
56+
#
57+
58+
#
59+
# ServerRoot: The top of the directory tree under which the server's
60+
# configuration, error, and log files are kept.
61+
#
62+
# NOTE! If you intend to place this on an NFS (or otherwise network)
63+
# mounted filesystem then please read the Mutex documentation (available
64+
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
65+
# you will save yourself a lot of trouble.
66+
#
67+
# Do NOT add a slash at the end of the directory path.
68+
#
69+
#ServerRoot "/etc/apache2"
70+
71+
#
72+
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
73+
#
74+
#Mutex file:${APACHE_LOCK_DIR} default
75+
76+
#
77+
# The directory where shm and other runtime files will be stored.
78+
#
79+
80+
DefaultRuntimeDir ${APACHE_RUN_DIR}
81+
82+
#
83+
# PidFile: The file in which the server should record its process
84+
# identification number when it starts.
85+
# This needs to be set in /etc/apache2/envvars
86+
#
87+
PidFile ${APACHE_PID_FILE}
88+
89+
#
90+
# Timeout: The number of seconds before receives and sends time out.
91+
#
92+
Timeout 300
93+
94+
#
95+
# KeepAlive: Whether or not to allow persistent connections (more than
96+
# one request per connection). Set to "Off" to deactivate.
97+
#
98+
KeepAlive On
99+
100+
#
101+
# MaxKeepAliveRequests: The maximum number of requests to allow
102+
# during a persistent connection. Set to 0 to allow an unlimited amount.
103+
# We recommend you leave this number high, for maximum performance.
104+
#
105+
MaxKeepAliveRequests 100
106+
107+
#
108+
# KeepAliveTimeout: Number of seconds to wait for the next request from the
109+
# same client on the same connection.
110+
#
111+
KeepAliveTimeout 5
112+
113+
114+
# These need to be set in /etc/apache2/envvars
115+
User ${APACHE_RUN_USER}
116+
Group ${APACHE_RUN_GROUP}
117+
118+
#
119+
# HostnameLookups: Log the names of clients or just their IP addresses
120+
# e.g., www.apache.org (on) or 204.62.129.132 (off).
121+
# The default is off because it'd be overall better for the net if people
122+
# had to knowingly turn this feature on, since enabling it means that
123+
# each client request will result in AT LEAST one lookup request to the
124+
# nameserver.
125+
#
126+
HostnameLookups Off
127+
128+
# ErrorLog: The location of the error log file.
129+
# If you do not specify an ErrorLog directive within a <VirtualHost>
130+
# container, error messages relating to that virtual host will be
131+
# logged here. If you *do* define an error logfile for a <VirtualHost>
132+
# container, that host's errors will be logged there and not here.
133+
#
134+
ErrorLog ${APACHE_LOG_DIR}/error.log
135+
136+
#
137+
# LogLevel: Control the severity of messages logged to the error_log.
138+
# Available values: trace8, ..., trace1, debug, info, notice, warn,
139+
# error, crit, alert, emerg.
140+
# It is also possible to configure the log level for particular modules, e.g.
141+
# "LogLevel info ssl:warn"
142+
#
143+
LogLevel warn
144+
145+
# Include module configuration:
146+
IncludeOptional mods-enabled/*.load
147+
IncludeOptional mods-enabled/*.conf
148+
149+
# Include list of ports to listen on
150+
Include ports.conf
151+
152+
153+
# Sets the default security model of the Apache2 HTTPD server. It does
154+
# not allow access to the root filesystem outside of /usr/share and /var/www.
155+
# The former is used by web applications packaged in Debian,
156+
# the latter may be used for local directories served by the web server. If
157+
# your system is serving content from a sub-directory in /srv you must allow
158+
# access here, or in any related virtual host.
159+
<Directory />
160+
Options FollowSymLinks
161+
AllowOverride None
162+
Require all denied
163+
</Directory>
164+
165+
<Directory /usr/share>
166+
AllowOverride None
167+
Require all granted
168+
</Directory>
169+
170+
<Directory /var/www/>
171+
Options Indexes FollowSymLinks
172+
AllowOverride None
173+
Require all granted
174+
</Directory>
175+
176+
177+
178+
#<Directory /srv/>
179+
# Options Indexes FollowSymLinks
180+
# AllowOverride None
181+
# Require all granted
182+
#</Directory>
183+
184+
185+
186+
187+
# AccessFileName: The name of the file to look for in each directory
188+
# for additional configuration directives. See also the AllowOverride
189+
# directive.
190+
#
191+
AccessFileName .htaccess
192+
193+
#
194+
# The following lines prevent .htaccess and .htpasswd files from being
195+
# viewed by Web clients.
196+
#
197+
<FilesMatch "^\.ht">
198+
Require all denied
199+
</FilesMatch>
200+
201+
202+
#
203+
# The following directives define some format nicknames for use with
204+
# a CustomLog directive.
205+
#
206+
# These deviate from the Common Log Format definitions in that they use %O
207+
# (the actual bytes sent including headers) instead of %b (the size of the
208+
# requested file), because the latter makes it impossible to detect partial
209+
# requests.
210+
#
211+
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
212+
# Use mod_remoteip instead.
213+
#
214+
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
215+
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
216+
LogFormat "%h %l %u %t \"%r\" %>s %O" common
217+
LogFormat "%{Referer}i -> %U" referer
218+
LogFormat "%{User-agent}i" agent
219+
220+
# Include of directories ignores editors' and dpkg's backup files,
221+
# see README.Debian for details.
222+
223+
# Include generic snippets of statements
224+
IncludeOptional conf-enabled/*.conf
225+
226+
# Include the virtual host configurations:
227+
IncludeOptional sites-enabled/*.conf
228+
229+
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

copywp.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cp -R /usr/src/wordpress ./
2+
rm -rf ./wp-content/*

docker-compose.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# RPI Student Senate website
2+
# #WTG
3+
version: "3"
4+
services:
5+
web:
6+
image: wordpress:latest
7+
links:
8+
- "db:database"
9+
working_dir: /var/www/html
10+
environment:
11+
WORDPRESS_DB_HOST: db:3306
12+
WORDPRESS_DB_USER: root
13+
WORDPRESS_DB_PASSWORD: password
14+
ports:
15+
- "8000:80"
16+
volumes:
17+
- ./wp-content:/var/www/html/wp-content
18+
db:
19+
image: mariadb
20+
environment:
21+
- MYSQL_ROOT_PASSWORD=password

readme.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Coding and Community website
2+
3+
## Local Development
4+
5+
A docker-compose.yml is included for convenience
6+
7+
### Running the site locally
8+
9+
1. Install [Docker](https://docs.docker.com/install/) and [Docker-compose](https://docs.docker.com/compose/install/)
10+
2. Run `docker-compose up` in the project directory, a wordpress instance with the wp-content directory mounted will be started along with a mariadb database
11+
3. Visit http://localhost:8000 and perform initial wordpress configuration
12+
13+
### Theme Development
14+
15+
toto

wp-config.php

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<?php
2+
/**
3+
* The base configurations of the WordPress.
4+
*
5+
* This file has the following configurations: MySQL settings, Table Prefix,
6+
* Secret Keys, and ABSPATH. You can find more information by visiting
7+
* {@link http://codex.wordpress.org/Editing_wp-config.php Editing wp-config.php}
8+
* Codex page. You can get the MySQL settings from your web host.
9+
*
10+
* This file is used by the wp-config.php creation script during the
11+
* installation. You don't have to use the web site, you can just copy this file
12+
* to "wp-config.php" and fill in the values.
13+
*
14+
* @package WordPress
15+
*/
16+
17+
// ** MySQL settings - You can get this info from your web host ** //
18+
/** The name of the database for WordPress */
19+
//define('WP_CACHE', true); //Added by WP-Cache Manager
20+
// define( 'WPCACHEHOME', '/home/stugov/public_html/wp-content/plugins/wp-super-cache/' ); //Added by WP-Cache Manager
21+
define('DISABLE_CACHE', true);
22+
23+
// ** Heroku Postgres settings - from Heroku Environment ** //
24+
$db = parse_url($_ENV["DATABASE_URL"]);
25+
// ** MySQL settings - You can get this info from your web host ** //
26+
/** The name of the database for WordPress */
27+
define('DB_NAME', trim($db["path"],"/"));
28+
/** MySQL database username */
29+
define('DB_USER', $db["user"]);
30+
/** MySQL database password */
31+
define('DB_PASSWORD', $db["pass"]);
32+
/** MySQL hostname */
33+
define('DB_HOST', $db["host"]);
34+
35+
36+
/** Database Charset to use in creating database tables. */
37+
define('DB_CHARSET', 'utf8');
38+
39+
/** The Database Collate type. Don't change this if in doubt. */
40+
define('DB_COLLATE', '');
41+
42+
define('FS_METHOD', 'direct');
43+
44+
/**#@+
45+
* Authentication Unique Keys and Salts.
46+
*
47+
* Change these to different unique phrases!
48+
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
49+
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
50+
*
51+
* @since 2.6.0
52+
*/
53+
define('AUTH_KEY', '[c#fnTZ6tkhhkfkdke!O`-%bPfat=;3vu#SBouhkk}4W|(`^#tgL51hm$|a|IfDC');
54+
define('SECURE_AUTH_KEY', 'vWW0}dLx4mv*|YB,RB29H+3ZnH<t_?7-T@f*V[9f_rnU8&}]LWljj|TrgA^k1V3D');
55+
define('LOGGED_IN_KEY', '|ElM~VFqU.,!{1-PL<=BNXQ_2eZ9*iOUuKb+)%}SaXfS)uA|/asdftA`T_LUC!&(');
56+
define('NONCE_KEY', 'MG80#_3k905i+5$@}av%I_!9%awH9|w}/||2|#ey}{*|q=J5u7fdfMPeckH+pc%#');
57+
define('AUTH_SALT', '-x@?E6vqZG{%@By|Z#j|:bkEmib>6,n9Uc*]z@fdfu2Wq]-*.n/&=m1yGH#+X*8#');
58+
define('SECURE_AUTH_SALT', 'H*BnLy# |pd4yQa,XD[9xhLnb&Ef_aasdoXc<^$z%?Mh]-Z:{H}GRV0A8Ep]/ZmS');
59+
define('LOGGED_IN_SALT', 'mO#TPdDqlFw;%G+gn=#|z^hsSrq|jdfas>d@|<(d0lLS|hK^;+qcm%N|Kzm7j#.4');
60+
define('NONCE_SALT', 'P91=3;XtUaub[cz:++M4|g5n[i`fdvA:1^}AnAbB&kWbn?N9%9$%b!6TCWX(SR*:');
61+
62+
/**#@-*/
63+
64+
/**
65+
* WordPress Database Table prefix.
66+
*
67+
* You can have multiple installations in one database if you give each a unique
68+
* prefix. Only numbers, letters, and underscores please!
69+
*/
70+
$table_prefix = 'wp_';
71+
72+
/**
73+
* For developers: WordPress debugging mode.
74+
*
75+
* Change this to true to enable the display of notices during development.
76+
* It is strongly recommended that plugin and theme developers use WP_DEBUG
77+
* in their development environments.
78+
*/
79+
define('WP_DEBUG', true);
80+
81+
// in some setups HTTP_X_FORWARDED_PROTO might contain
82+
// a comma-separated list e.g. http,https
83+
// so check for https existence
84+
$_SERVER['HTTPS']='on';
85+
86+
define('WP_HOME', 'https://sg.rpi.edu');
87+
define('WP_SITEURL', 'https://sg.rpi.edu');
88+
89+
/** Absolute path to the WordPress directory. */
90+
if ( !defined('ABSPATH') )
91+
define('ABSPATH', dirname(__FILE__) . '/');
92+
93+
/** Sets up WordPress vars and included files. */
94+
require_once(ABSPATH . 'wp-settings.php');
95+
96+
/* Set up secret wp-admin folder */
97+
// define('WP_ADMIN_DIR', 'stugov-backend');
98+
// define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . WP_ADMIN_DIR);

wp-content/.DS_Store

6 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

0 commit comments

Comments
 (0)