Skip to content

Commit

Permalink
Feature/docker compose (#3)
Browse files Browse the repository at this point in the history
* we don't need to set the env in the file, we can just set it explicitly in the docker file

* add docker compose

* add message if all are disabled

* spacing to docker compose for envs
  • Loading branch information
Mike Zrimsek authored Feb 27, 2024
1 parent e008130 commit 738b69d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ FROM ubuntu:22.04 as base
LABEL org.opencontainers.image.source https://github.com/mzrimsek/jellyfin-auto-collections

ENV DEBIAN_FRONTEND noninteractive
ENV RUNNING_IN_DOCKER true

RUN apt-get update && apt-get install -y python3.10 wget

RUN wget -O /tmp/script.py https://bootstrap.pypa.io/get-pip.py
Expand Down
24 changes: 24 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: "3"

services:
jellyfin-auto-collections:
image: ghcr.io/mzrimsek/jellyfin-auto-collections
container_name: jellyfin-auto-collections
environment:
- JELLYFIN_SERVER_URL=${JELLYFIN_SERVER_URL}
- JELLYFIN_API_KEY=${JELLYFIN_API_KEY}
- JELLYFIN_USER_ID=${JELLYFIN_USER_ID}
- JELLYFIN_MOVIES_DIR=${JELLYFIN_MOVIES_DIR}

- DISABLE_TV_YEAR_CHECK=${DISABLE_TV_YEAR_CHECK:-false}

- DO_KERMODE_INTROS=${DO_KERMODE_INTROS:-false}
- DO_KERMODE_LISTS=${DO_KERMODE_LISTS:-false}
- DO_TURNER_CLASSIC_MOVIE_EXTRAS=${DO_TURNER_CLASSIC_MOVIE_EXTRAS:-false}
- DO_TOP_1000_MOVIES_LIST=${DO_TOP_1000_MOVIES_LIST:-false}
- DO_IMDB_CHARTS=${DO_IMDB_CHARTS:-false}
- DO_IMDB_LISTS=${DO_IMDB_LISTS:-false}
- DO_LETTERBOXD_LISTS=${DO_LETTERBOXD_LISTS:-false}
volumes:
- ${CONFIG_DIR}/jellyfin-auto-collections/config:/app/config
restart: unless-stopped
6 changes: 1 addition & 5 deletions example.env
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,4 @@ DO_IMDB_CHARTS=false
# whether to run imdb_list.py
DO_IMDB_LISTS=false
# whether to run letterboxd_list.py
DO_LETTERBOXD_LISTS=false

# docker settings
# flag to trigger adjustments for running in a container
RUNNING_IN_DOCKER=false
DO_LETTERBOXD_LISTS=false
5 changes: 5 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
do_imdb_lists = app_config["do_imdb_lists"]
do_letterboxd_lists = app_config["do_letterboxd_lists"]

all_disabled = not (do_kermode_intros or do_kermode_lists or do_turner_classic_movie_extras or do_top_1000_movies_list or do_imdb_charts or do_imdb_lists or do_letterboxd_lists)
if all_disabled:
print("All tasks are disabled. Enable at least one with environment settings. Please ensure config.yaml is populated as needed.")
exit()

if do_kermode_intros:
update_mark_kermode_reviews_intros(app_config)

Expand Down

0 comments on commit 738b69d

Please sign in to comment.