Sign inSign up

shinsenter/flarum

Sponsored OSS

By SHIN Company

•Updated about 17 hours ago

šŸ”‹ (PHP / Flarum) Production-ready Docker images with automatic Flarum installer.

Image
Languages & frameworks
Developer tools
Web servers
12

100K+

shinsenter/flarum repository overview

⁠shinsenter/flarum

šŸ”‹ (PHP / Flarum) Production-ready Docker images with automatic Flarum installer.

The Docker images are available for both Debian and Alpine versions.

⁠Introduction

Our PHP Docker images, available on Docker Hub⁠, let you configure PHP and PHP-FPM settings through environment variables, with no image rebuild required.

These images also include the latest version of Composer⁠.

⁠Usage

shinsenter/php

Check out our documentation⁠ to learn how to customize these Docker images for your projects.

⁠Creating a New Project

When you mount an empty directory into the container, it will automatically download the entire source code for the framework, allowing you to bootstrap a new project quickly.

⁠Steps to Create a New Project
  1. Create an empty directory on your host machine for your project code. For example:
mkdir flarum
  1. Run the container and mount the empty directory as a volume. For example:
docker run -p 80:80 -p 443:443 -p 443:443/udp \
    -v ./flarum:/var/www/html \
    shinsenter/flarum:latest

The container will detect the empty directory mounted to /var/www/html and clone the framework source code into it.

⁠Using an Existing Project

You can mount your application code from your host machine to the /var/www/html directory inside the container.

Because the source code is mounted as a volume, any changes made on the host machine are reflected inside the container.

⁠Using HTTPS

The Docker images come with pre-generated SSL certificate files for testing HTTPS locally:

  • /etc/ssl/site/server.crt
  • /etc/ssl/site/server.key

To use valid HTTPS certificates in production, replace these files with your own certificate and key. Copy or mount your certificates from the host machine into the container, overwriting the default files.

⁠Using Dockerfile
FROM shinsenter/flarum:latest

# Copy your own certs into the container
COPY my_domain.crt /etc/ssl/site/server.crt
COPY my_domain.key /etc/ssl/site/server.key

# Add your instructions here
# For example:
# ADD --chown=$APP_USER:$APP_GROUP ./flarum/ /var/www/html/
⁠Using docker run
docker run -p 80:80 -p 443:443 -p 443:443/udp \
    -v ./flarum:/var/www/html \
    -v ./my_domain.crt:/etc/ssl/site/server.crt \
    -v ./my_domain.key:/etc/ssl/site/server.key \
    shinsenter/flarum:latest
⁠Using docker-compose
services:
  web:
    image: shinsenter/flarum:latest
    volumes:
      - ./flarum:/var/www/html
      - ./my_domain.crt:/etc/ssl/site/server.crt
      - ./my_domain.key:/etc/ssl/site/server.key

⁠Stable Image Tags

The release versions on this GitHub repository⁠ don't guarantee that Docker images built from the same source code will always be identical.

We build new Docker images daily to ensure they stay up-to-date with the latest upstream updates for PHP, base OS, Composer, etc. The images in this repo are regularly updated under the same tag names.

But you can pull the image from shinsenter/flarum:latest, and tag it with a name that indicates its stability, such as your-repo/flarum:stable using the below commands:

docker pull shinsenter/flarum:latest
docker tag  shinsenter/flarum:latest your-repo/flarum:stable
docker push your-repo/flarum:stable

Then use the image your-repo/flarum:stable as a base image to build containers for production.

⁠Contributing

If you find these images useful, consider donating via PayPal⁠ or opening an issue on GitHub⁠.

⁠License

This project is licensed under the terms of the GNU General Public License v3.0⁠.

Please respect the work that went into these images. If you reuse ideas from this project, credit is appreciated.


From Vietnam šŸ‡»šŸ‡³ with love.

Tag summary

Content type

Image

Digest

sha256:6b596119b…

Size

91.5 MB

Last updated

about 17 hours ago

docker pull shinsenter/flarum

This week's pulls

Pulls:

4,339

Last week