Skip to content

MaribelHearn/maribelhearn.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3,574 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Maribel Hearn's Web Portal

website-status

This website provides a collection of conveninent Web pages that is primarily targetted at the Touhou gameplay community, such as the current world records, patch and tool downloads, and explanations of community jargon. It also hosts a tool to create Touhou tier lists, as well as an English translation of the results of the annual Japanese Touhou popularity poll.

How to run

First, clone the repository in whatever way you prefer and navigate to its directory.

git clone https://github.com/MaribelHearn/maribelhearn.com.git
cd maribelhearn.com

Use the Dockerfile provided in the repository to build a Docker image. This website uses PHP-FPM, so a separate container should be run for that as well.

In the repository's parent directory, you may use a Docker Compose file:

maribelhearn:
  image: maribelhearn
  container_name: maribelhearn
  restart: 'unless-stopped'
  volumes:
    - ./maribelhearn.com:/var/www/maribelhearn.com
    - ./mh_backend/static:/var/www/maribelhearn.com/static:ro
    - ./mh_backend/media:/var/www/maribelhearn.com/media:ro
  ports:
    - <your_port_here>:80
  env_file:
    - ./maribelhearn.com/.env.prod
php:
  image: bitnami/php-fpm
  ports:
    - 9000:9000
  volumes:
    - ./maribelhearn.com:/var/www/maribelhearn.com

This assumes you are also running the backend, which is necessary for the WR and LNN data. The backend also comes with a Dockerfile to run it as a container.

Copy the environment file from .env.template and name it for example .env.dev or .env.prod. In it, you should specify the address PHP-FPM is run at (usually your device's local IP address).

In the PHP-FPM container, enable the gettext module. Install the locales package and enable every locale listed in the locale directory in this repository, such as en_GB.UTF-8 UTF-8.

Running without Docker

Prerequisites:

  • PHP (version 8 or newer)

Required PHP modules:

  • curl
  • gettext
  • mbstring
  • sqlite3

Use a Web server such as Apache or Nginx to host the site. Apache is assumed, for the purpose of the Docker image.

The apache.conf file contains the Apache virtual host used for the site. It assumes it is running behind a reverse proxy. If you are not using a reverse proxy, remove the LogFormat line from apache.conf and replace custom with common for the CustomLog.

For translations to work, you need to enable every locale listed in the locale directory in this repository, such as en_GB.UTF-8 UTF-8.

Development

Once you have cloned the repository, run the PHP development server from the directory you cloned to. See the prerequisites listed in the previous section for required installations.

php -S 127.0.0.1:8000 router.php

Connect to http://127.0.0.1:8000 using your browser. You can also specify a port other than 8000. Specifying router.php is optional, but if you omit it, you cannot access the admin panel through /admin.

To update the translations after the locale files have been altered, restart the PHP development server.

About

A collection of webpages for the Touhou community; largely convenient pages for the games.

Topics

Resources

License

MIT, OFL-1.1 licenses found

Licenses found

MIT
LICENSE
OFL-1.1
OFL

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Contributors