Giter Club home page Giter Club logo

flarum-docker's Introduction

Flarum Docker image [UNMAINTAINED]

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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

flarum-docker's Issues

ERROR: Service 'flarum' failed to build

Hi!
I am getting this error when I tried to deploy the docker:

[root@server flarum]# docker-compose up -d
Building flarum
Step 1/50 : FROM phusion/baseimage
---> 166cfc3f6974
Step 2/50 : MAINTAINER Sebastien Pujadas http://pujadas.net
---> Using cache
---> ac9802ee9bd3
Step 3/50 : ENV REFRESHED_AT 2015-05-12
---> Using cache
---> fc2e863bab6b
Step 4/50 : RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C && add-apt-repository -y ppa:ondrej/php5-5.6 && apt-key update && apt-get update -qq
---> Running in 1f162a8f3585
Executing: /tmp/tmp.cwrSCWSntM/gpg.1.sh --keyserver
keyserver.ubuntu.com
--recv-keys
4F4EA0AAE5267A6C
gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
gpg: key E5267A6C: public key "Launchpad PPA for Ondřej Surý" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
Cannot add PPA: 'ppa:~ondrej/ubuntu/php5-5.6'.
The user named '~ondrej' has no PPA named 'ubuntu/php5-5.6'
Please choose from the following available PPAs:

  • 'apache2': PPA for Apache 2.x
  • 'apache2-qa': PPA for Apache2 (QA builds; experimental)
  • 'autotools': PPA for autotools (not-supported; build-dependency; experimental)
  • 'bind9': PPA for BIND 9
  • 'cmake': PPA for CMake (not-supported, experimental)
  • 'common': Common PPA packages
  • 'cyrus-imapd': PPA for Cyrus IMAP
  • 'debhelper': PPA for Debhelper (and friends)
  • 'golang': PPA for Go (experimental, build-dependency)
  • 'llvm': PPA for LLVM
  • 'mariadb-10.0': PPA for MariaDB 10.0 (don't use, broken)
  • 'mysql-5.5': PPA for MySQL 5.5 (don't use, broken)
  • 'mysql-5.6': PPA for MySQL 5.6 (don't use, broken)
  • 'mysql-5.7': PPA for MySQL 5.7 (don't use, broken)
  • 'nginx': PPA for NGINX Stable with HTTP/2
  • 'nginx-mainline': PPA for NGINX Mainline with HTTP/2
  • 'nginx-qa': PPA for NGINX Mainline (QA builds; experimental)
  • 'pelican': PPA for Pelican
  • 'php': ***** The main PPA for supported PHP versions with many PECL extensions *****
  • 'php-qa': PPA for PHP (QA builds; experimental)
  • 'php-zts': PPA for PHP ZTS (experimental, unsupported)
  • 'php5-compat': PPA with dummy compatibility php5* packages
  • 'pkg-dpkg': dpkg and friends (very experimental)
  • 'pkg-gearman': PPA for Gearman
  • 'pkg-nlnetlabs': NLNetLabs Backported Packages
  • 'sandbox': Sandbox for preparation of various packages (DON'T USE)
  • 'seafile': PPA for Seafile
  • 'unbound': PPA for Unbound (mainly a build-dep)
  • 'zonemaster': PPA for Zonemaster
    ERROR: Service 'flarum' failed to build: The command '/bin/sh -c apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C && add-apt-repository -y ppa:ondrej/php5-5.6 && apt-key update && apt-get update -qq' returned a non-zero code: 1

Any idea what I am doing wrong?

Thanks and BR,

Forked it, tossed it in docker hub.....

It is blowing up as follows on Docker Hub:

The command [/bin/sh -c mkdir -p ${FLARUM_ROOT}/flarum/core && cd ${FLARUM_ROOT}/flarum/core && git clone https://github.com/flarum/core . && mkdir public] returned a non-zero code: 1

And on my PC, it is blowing up as follows:
Service 'flarum' failed to build: The command [/bin/sh -c apt-get install -qqy curl unzip git-core ack-grep software-properties-common build-essential php5-cli php5-fpm php5-mysql php5-pgsql php5-sqlite php5-curl php5-gd php5-gmp php5-mcrypt php5-memcached php5-imagick php5-intl php5-xdebug] returned a non-zero code: 100

When I get it working, I'll toss out a pull request. Thanks for maknig it!

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.