Giter Site home page Giter Site logo

flarum-docker's Introduction

Flarum Docker image

Flarum is an open source forum web application written in PHP (Laravel) and JavaScript (Mithril).

This is a Docker image for the development version of Flarum, which can be used as is to try out the application, or which can be adapted to contribute to Flarum.

Preparation

Once you run the image, the Flarum application will be made available at http://flarum.dev, which means that flarum.dev needs to point to the IP address that the container is published at.

Assuming that the container is published at the IP address 127.0.0.1 (i.e. localhost, see the note below for more information on IP addresses), then you need to add this line to your hosts file (/etc/hosts on Linux and OS X, %SystemRoot%\System32\drivers\etc\hosts on Windows):

127.0.0.1 flarum.dev   

Note — To configure and/or find out the IP address of a VM-hosted Docker installation, see https://docs.docker.com/installation/windows/ (Windows) and https://docs.docker.com/installation/mac/ (OS X) for guidance if using Boot2Docker. If you're using Vagrant, you'll need to set up port forwarding (see https://docs.vagrantup.com/v2/networking/forwarded_ports.html.

TMI — The front end's URL is hardcoded as http://flarum.dev and the back end's URL is hardcoded as http://flarum.dev/api. Forcing the front and the back end to have the same hardcoded hostname requires an extra step to make the hostname resolvable, but it is an easy way to comply with the same-origin policy in a development environment.

Usage

Run with:

docker run -p 80:80 sebp/flarum

Alternatively, if you're using Docker Compose, use an entry such as this one in your docker-compose.yml file:

flarum:
  image: sebp/flarum
  ports:
    - "80:80"

and run with:

docker-compose up flarum

Build notes

To make the image consistently rebuildable by Docker (and thus avoid issues when major things change in the source code), the build process checks out a specific commit of the flarum/flarum source code rather than the latest commit.

Two additional workarounds are needed to make that version work:

About

Written by Sébastien Pujadas, released under the MIT license.

flarum-docker's People

Contributors

spujadas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.