mirror of
https://codeberg.org/vlw/vlw.se.git
synced 2025-09-13 21:13:40 +02:00
Update README.md
This commit is contained in:
parent
f7a237f6fe
commit
234c6c68a6
1 changed files with 48 additions and 55 deletions
103
README.md
103
README.md
|
@ -1,73 +1,66 @@
|
|||
# vlw.se
|
||||
This is the source code behind [vlw.se](https://vlw.se) which has been written from the ground up by me. This website is built on top of my [Vegvisir web framework](https://vegvisir.vlw.se) and my [Reflect API framework](https://reflect.vlw.se).
|
||||
This is the source code behind [vlw.se](https://vlw.se) which is my personal website that I have written and designed from the ground up. The website is built on top of my own [web framework](https://vegvisir.vlw.se) and its API is also built on top of my own [API framework](https://reflect.vlw.se).
|
||||
|
||||
# Installation
|
||||
If you for whatever reason want to get this website up and running for yourself this is how that is done.
|
||||
Here's how you get my website up and running on your own machine. Note, I have only tested this on Linux and the install script we will run later is written in bash.
|
||||
|
||||
## This website requires the following prerequisites
|
||||
- [PHP 8.0+](https://www.php.net/)
|
||||
- [MariaDB 14+](https://mariadb.org/)
|
||||
- [The NPM package manager](https://www.npmjs.com/)
|
||||
- [The Reflect API framework](https://reflect.vlw.se)
|
||||
- [The Vegvisir web framework](https://vegvisir.vlw.se)
|
||||
- [The composer package manager](https://getcomposer.org/)
|
||||
**Make sure you have both of these package managers installed before proceeding:**
|
||||
- [Composer](https://getcomposer.org/)
|
||||
- [NPM](https://www.npmjs.com/)
|
||||
|
||||
**Confimed supported framework versions:**
|
||||
Vegvisir|Reflect
|
||||
--|--
|
||||
✅ [`3.1.0`](https://codeberg.org/vegvisir/vegvisir/releases/tag/3.1.0)|✅ [`2.7.2`](https://codeberg.org/reflect/reflect/releases/tag/2.7.2)
|
||||
## 1. Clone this repo
|
||||
Clone/download this repo to your machine. Preferably to a non-public directory - the frameworks will handle that.
|
||||
|
||||
## Website (Vegvisir)
|
||||
1. **Download this repo**
|
||||
|
||||
Git clone or download this repo to any local folder
|
||||
```
|
||||
git clone https://codeberg.org/vlw/vlw.se
|
||||
```
|
||||
2. **Download and install Vegvisir**
|
||||
|
||||
Follow the installation instructions for [Vegvisir](https://vegvisir.vlw.se/docs/installation) and point the `root_path` variable to your local vlw.se folder.
|
||||
```
|
||||
git clone https://codeberg.org/vlw/vlw.se --depth 1
|
||||
```
|
||||
|
||||
3. **Run the install script**
|
||||
## 2. Install [Vegvisir](https://vegvisir.vlw.se) and [Reflect](https://reflect.vlw.se)
|
||||
Follow the installation instructions for my web, and API framework. This site uses the default configuration for both frameworks so the only thing you need to do after you've installed both is to point the `root_path` and `endpoints` directory respectively to the directory where you cloned this repo.
|
||||
|
||||
This bash script will install dependencies and make npm modules public.
|
||||
```
|
||||
./install.sh
|
||||
```
|
||||
- [Vegvisir installation](https://vegvisir.vlw.se)
|
||||
- [Reflect installation](https://reflect.vlw.se)
|
||||
|
||||
Et voila! You probably want to install the API-side too but the website itself should now be accessible from your configured Vegvisir host.
|
||||
*Example:*
|
||||
```sh
|
||||
# Vegvisir
|
||||
root_path = "/var/www/vlw.se"
|
||||
# Reflect
|
||||
endpoints = "/var/www/vlw.se"
|
||||
```
|
||||
|
||||
## API (Reflect)
|
||||
The API (and database) is where most content is stored and served from on this website.
|
||||
## 3. Run the install script
|
||||
Run the `install.sh` script from the root of the repo directory. [Make sure you have the required package managers installed](#installation).
|
||||
|
||||
1. **Download this repo**
|
||||
**Example:**
|
||||
```sh
|
||||
# vlw@example:$
|
||||
cd /var/www/vlw.se
|
||||
# vlw@example:/var/www/vlw.se$
|
||||
./install.sh
|
||||
```
|
||||
|
||||
**You can skip this if you've already downloaded the repo from step 1 in the website installation.**
|
||||
## 4. Import the database template
|
||||
There's an SQL file that you can download from the releases page that has a snapshot of the MariaDB database I use on my live website. The snapshot data is not guaranteed to be up to date; but the database structure will be. Download and import this file into an existing database.
|
||||
|
||||
Otherwise... Git clone or download this repo to any local folder
|
||||
```
|
||||
git clone https://codeberg.org/vlw/vlw.se
|
||||
```
|
||||
- [Download SQL-snapshot](https://codeberg.org/vlw/vlw.se/releases)
|
||||
|
||||
2. **Download and install Reflect**
|
||||
|
||||
Follow the installation instructions for [Reflect](https://reflect.vlw.se/docs/installation) and point the `endpoints` variable to the `/api` subdirectory in the local vlw.se folder.
|
||||
## 5. Set environment variables
|
||||
Make a copy of the `.env.example.ini` file called `.env.ini` from the root directory of the repo. There are a few parameters you can change here but the required ones are the following:
|
||||
|
||||
3. **Install dependencies**
|
||||
```ini
|
||||
[client_api]
|
||||
base_url = ""
|
||||
api_key = ""
|
||||
|
||||
`cd` into the api folder and install dependencies with composer.
|
||||
```
|
||||
composer install --optimize-autoloader
|
||||
```
|
||||
[server_database]
|
||||
host = ""
|
||||
user = ""
|
||||
pass = ""
|
||||
db = ""
|
||||
```
|
||||
|
||||
4. **Create and import database**
|
||||
Please refer to the comments in the ini file for more information about each field.
|
||||
|
||||
[Create and] import the two databases associated with vlw.se data and the Reflect API configurations from `.sql` files on the Releases page.
|
||||
|
||||
5. **Set environment variables**
|
||||
|
||||
Make a copy of `/api/.env.example.ini` and change the `[vlwdb]` variables with your MariaDB credentials.
|
||||
|
||||
6. **Set environment variables for website**
|
||||
|
||||
It's reasonable to assume if you've installed the website from this repo that you'd also want to use the API with it. Start my making a copy of `/.env.example.ini` (root directory) and change the `[api]` variables to point to your API hostname.
|
||||
## Done!
|
||||
That should be it. Navigate to your configured Vegvisir public host!
|
Loading…
Add table
Reference in a new issue