Coder Social home page Coder Social logo

Comments (6)

hardware avatar hardware commented on May 25, 2024

It is supposed to put exactly that url on the config.php file?

Absolutely, this variable set the baseUrl parameter in config.yml file and then this value is set in config.php during flarum installation.

cat > config.yml <<EOF
[...]
baseUrl: ${FORUM_URL}
EOF

flarum install --file config.yml

from docker-flarum.

AlexDaciuk avatar AlexDaciuk commented on May 25, 2024

But it doesn't, at least with the last version of the dockerfile from dockerhub

from docker-flarum.

hardware avatar hardware commented on May 25, 2024

It's because i removed the writeSettings() method during flarum initialisation (not flarum installation, when the container is restarted for second time), try removing this line, rebuild the image and restart the container https://github.com/mondediefr/flarum/blob/master/run.sh#L88

Flarum installation isn't docker friendly for the moment... I will try to fix this issue later.

from docker-flarum.

hardware avatar hardware commented on May 25, 2024

I think i found a solution, instead of using install command when flarum is already installed, i should use migrate command and update manually the config.php file with database params, baseUrl and debug mode.

First installation :

php flarum install --file config.yml

When flarum is already installed :

php flarum migrate
php flarum cache:clear

# Update config.php file :
if [ -f "config.php" ]; then
  sed -i -e "s|\('debug' =>\) .*|\1 ${DEBUG},|" \
         -e "s|\('host' =>\) .*|\1 '${DB_HOST}',|" \
         -e "s|\('database' =>\) .*|\1 '${DB_NAME}',|" \
         -e "s|\('username' =>\) .*|\1 '${DB_USER}',|" \
         -e "s|\('password' =>\) .*|\1 '${DB_PASS}',|" \
         -e "s|\('prefix' =>\) .*|\1 '${DB_PREF}',|" \
         -e "s|\('url' =>\) .*|\1 '${FORUM_URL}',|" config.php
fi

Sources :

php flarum install
php flarum migrate
php flarum cache:clear

EDIT: not working with v0.1.0-beta.5, waiting for beta 6 to apply this workflow.

from docker-flarum.

AlexDaciuk avatar AlexDaciuk commented on May 25, 2024

Sorry for not answering, but I'm having DNS problems with my server so can't test this

I'll be posting when I'm get my DNS going

Cheers

from docker-flarum.

AlexDaciuk avatar AlexDaciuk commented on May 25, 2024

After pulling the latest image and running the compose with https url declared on .env, doesn't seem to be having any problem with https, closing the issue

from docker-flarum.

Related Issues (20)

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.