Sign inSign up

mwalbeck/flox

By mwalbeck

Updated 17 days ago

Flox is a self hosted Movie, Series and Animes watch list.

Image
3

10K+

mwalbeck/flox repository overview

docker-flox

Build Status Docker Pulls

This is a docker image for flox built from the current master branch. You can find the image on Docker Hub and the source code can be found here with a mirror on github.

Usage

This is a php-fpm based image, which means you need another container to act as the webserver. For this I would recommend nginx and you can find an example nginx config below.

The container can be configured with environment variables and you can see the list of options below. You can also specify an arbitrary UID and GID for the container to run as with the default being 1000 for both.

The container support using Mariadb/MySQL or PostreSQL as the database instead of sqlite, and is the reason why the image is currently being built from master instead of the latest release.

OBS: The very first time you start the container FLOX_DB_INIT should be set to true. Afterwards it should be set to false and the container should be restarted. FLOX_DB_INIT should only be set when you want to initialise a new database. If you don't set it to false after the first run then the container will failed to start.

Config options

Variable nameDefault valueDescription
UID1000The user id the container should run as.
GID1000The group id the container should run as.
FLOX_DB_INITfalseIf the database should be initialised when the container is started. Should only be true the first time you start the container.
FLOX_DB_CONNECTIONsqliteWhich database type to use. Can be either sqlite, mysql or pgsql
FLOX_DB_NAME/var/www/flox/backend/database/database.sqliteThe name of the database or when using sqlite the filepath of the database file.
FLOX_DB_USER-The database user. Only applicable when using either mysql or pgsql
FLOX_DB_PASS-The database users password. Only applicable when using either mysql or pgsql
FLOX_DB_HOSTlocalhostIP address or hostname for the database. Only applicable when using either mysql or pgsql
FLOX_DB_PORT3306The port the database is listening on. Only applicable when using either mysql or pgsql
FLOX_ADMIN_USERadminUsername of the admin account
FLOX_ADMIN_PASSadminPassword of the admin account
FLOX_APP_URLhttp://localhostThe root URL for flox
FLOX_APP_ENVlocalThe application environment. Can either be local or production
FLOX_APP_DEBUGfalseDebug mode. Can either be true or false
FLOX_TIMEZONEUTCYour timezone. Look here for timezone names
FLOX_DAILY_REMINDER_TIME10:00When to receive a daily reminder via email about tv episodes and movies coming out today.
FLOX_WEEKLY_REMINDER_TIME20:00When to receive a weekly reminder via email about tv episodes and movies that has come out during the last 7 days.
FLOX_TRANSLATION-Which language flox should use.
FLOX_DATE_FORMAT_PATTERNd.m.y
FLOX_REDIS_HOSTlocalhostIP address or hostname of your redis instance.
FLOX_REDIS_PASSWORDnullPassword for your redis instance, if applicable.
FLOX_REDIS_PORT6379The port used by your redis instance.
FLOX_MAIL_DRIVERsmtpWhich mail driver to use. Checkout the Laravel documentation for more options
FLOX_MAIL_HOST-IP address or hostname for your SMTP server
FLOX_MAIL_PORT587Port to use for sending mail.
FLOX_MAIL_USERNAME-SMTP username
FLOX_MAIL_PASSWORD-SMTP password
FLOX_MAIL_ENCRYPTIONtlsMail transport encryption
TMDB_API_KEY-An API key for TMDB. Look here for more info

Example docker-compose

version: '2'

volumes:
  flox:

networks:
  frontend:

services:
  flox:
    image: mwalbeck/getgrav:latest
    restart: on-failure:5
    networks:
      - frontend
    volumes:
      - flox:/var/www/flox
    environment:
      FLOX_ADMIN_USER: "something"
      FLOX_ADMIN_PASS: "something"
      FLOX_APP_URL: "something"
      TMDB_API_KEY: "something"
      FLOX_DB_INIT: true

  web:
    image: nginx:latest
    restart: on-failure:5
    networks:
      - frontend
    volumes:
      - flox:/var/www/flox:ro
      - /path/to/nginx:/etc/nginx:ro
    ports:
      - 80:80
      - 443:443

Example nginx config

server {
    listen [::]:80;
    listen 80;
    server_name localhost;

    root /var/www/flox/public;

    index index.php;

    charset utf-8;

    location ~ /\. {
        access_log off;
        log_not_found off;
        deny all;
    }

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    error_page 404 /index.php;

    location = /index.php {
        fastcgi_pass flox:9000;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        try_files $fastcgi_script_name =404;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

    location ~ \.php$ { return 403; }
}

Tag summary

Content type

Image

Digest

sha256:6b2f794b6

Size

186.2 MB

Last updated

17 days ago

docker pull mwalbeck/flox