2022-11-26 07:26:38 +00:00
|
|
|
![moodblog](https://donut.gq/sandbox/junk/moodblog.svg)
|
|
|
|
|
|
|
|
![Valid RSS!](https://validator.w3.org/feed/images/valid-rss-rogers.png)
|
|
|
|
![Valid CSS!](https://jigsaw.w3.org/css-validator/images/vcss-blue)
|
|
|
|
![Valid HTML!](https://donut.gq/sandbox/junk/html-5-valid.png)
|
2022-11-26 14:57:45 +00:00
|
|
|
![GPLv3 Licensed](https://www.gnu.org/graphics/agplv3-88x31.png)
|
2022-11-26 07:26:38 +00:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
1. Install your preferred webserver, PHP, MariaDB/MySQL, and MySQLi.
|
|
|
|
2. Start the MariaDB daemon.
|
|
|
|
3. If you haven't yet, run `mysql_secure_installation`.
|
|
|
|
4. Run `mysql -u root -p` to log in to the SQL database. (If this fails, try running it as root.)
|
|
|
|
5. Enter the following commands. Remember to change the placeholders!
|
|
|
|
```sql
|
|
|
|
CREATE DATABASE moodblog;
|
|
|
|
GRANT ALL ON moodblog.* TO 'moodblog'@'localhost' IDENTIFIED BY 'password';
|
2022-11-26 08:47:34 +00:00
|
|
|
USE moodblog;
|
|
|
|
CREATE TABLE IF NOT EXISTS articles (
|
|
|
|
ID INT NOT NULL AUTO_INCREMENT primary key,
|
|
|
|
Time TIMESTAMP,
|
|
|
|
Title VARCHAR(512) NOT NULL,
|
|
|
|
Mood VARCHAR(256),
|
|
|
|
MoodImage VARCHAR(256),
|
|
|
|
Song VARCHAR(256),
|
|
|
|
Message MEDIUMTEXT NOT NULL
|
|
|
|
);
|
2022-11-26 07:26:38 +00:00
|
|
|
FLUSH PRIVILEGES;
|
|
|
|
EXIT;
|
|
|
|
```
|
|
|
|
* Tip: You can use /dev/urandom encoded with base64 to create long, strong passwords.
|
|
|
|
```sh
|
2022-11-26 07:31:08 +00:00
|
|
|
base64 /dev/urandom -w 512 | head -n 1
|
|
|
|
```
|
2022-11-26 07:26:38 +00:00
|
|
|
6. Use git to clone this repository to any directory in your webroot.
|
|
|
|
* Example paths:
|
|
|
|
```
|
|
|
|
/var/www/html
|
|
|
|
/var/www/blog
|
|
|
|
/var/www/moodblog
|
|
|
|
/var/www/html/moodblog
|
|
|
|
/var/www/html/blog
|
|
|
|
```
|
|
|
|
7. Copy templates/creds.def.php to templates/creds.php. Change the placeholders.
|
|
|
|
8. Copy templates/config.def.php to templates/config.php. Change the placeholders.
|
|
|
|
* You really only need to change $url and $root to get a working installation, however, you really should change everything after $password.
|
|
|
|
9. Sever your leg please. It's the greatest day.
|
2022-11-26 20:28:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Using the Dockerfile
|
|
|
|
|
|
|
|
1. Git clone this repo
|
|
|
|
2. Make sure you have Docker Installed
|
|
|
|
2. Configure both moodblog configs and Caddyfile
|
|
|
|
3. Go! ```docker build```
|