mondediefr / docker-flarum

:speech_balloon: :whale: Docker image of Flarum
https://hub.docker.com/r/mondedie/flarum
MIT License
507 stars 131 forks source link

ERROR: Couldn't find env file: /mnt/docker/flarum/flarum.env #100

Closed InVinCiblezz closed 2 years ago

InVinCiblezz commented 3 years ago

I have pulled flarum image and created the Docker-compose.yml.

When I was running docker-compose,

ERROR: Couldn't find env file: /mnt/docker/flarum/flarum.env

How should I fix this problem? Thank you!

Hydrog3n commented 3 years ago

Hello @InVinCiblezz Did you well create the env file ?

InVinCiblezz commented 3 years ago

@Hydrog3n Sorry I just saw this. I think I might have some problems with the env file. Could u share this with me? Thanks a lot!

LittleSheep2Code commented 3 years ago

You can try this docker-compose.yml:

version: "3"

services:
  flarum:
    image: mondedie/flarum:stable
    container_name: flarum_core
    environment:
      - DEBUG=false
      - FORUM_URL=http://forum.smartsheep.club
      - DB_HOST=mariadb
      - DB_NAME=flarum
      - DB_USER=flarum
      - DB_PASS=blablabla
      - DB_PREF=flarum_
      - DB_PORT=3306
      - FLARUM_ADMIN_USER=blablabla
      - FLARUM_ADMIN_PASS=blablabla
      - FLARUM_ADMIN_MAIL=cadenjiang@outlook.com
      - FLARUM_TITLE=SmartSheep Studio
    volumes:
      - /root/dt-applications/flarum/assets:/flarum/app/public/assets
      - /root/dt-applications/flarum/extensions:/flarum/app/extensions
      - /root/dt-applications/flarum/storage/logs:/flarum/app/storage/logs
      - /root/dt-applications/flarum/nginx:/etc/nginx/flarum
    ports:
      - 8888:8888
    depends_on:
      - mariadb

  mariadb:
    image: mariadb:10.5
    container_name: flarum_mariadb
    environment:
      - MYSQL_ROOT_PASSWORD=blablabla
      - MYSQL_DATABASE=flarum
      - MYSQL_USER=flarum
      - MYSQL_PASSWORD=blablabla
    volumes:
      - /root/dt-applications/flarum/mysql:/var/lib/mysql