Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use environment variables in Shoko container #706

Closed
SuperFlue opened this issue Feb 5, 2018 · 6 comments
Closed

Use environment variables in Shoko container #706

SuperFlue opened this issue Feb 5, 2018 · 6 comments

Comments

@SuperFlue
Copy link

To make it easier to configure Shoko when setting up the container, it would be nice if we had the ability to set some config options beforehand.

The main thing i am thinking about is the possibility to define the database server and credentials before launching.

This would make it possible to create a docker-compose with a MySQL db (or whatever variant you prefer) and Shoko in one go without having to change Shoko's config file after it has started once.

@Cazzar
Copy link
Member

Cazzar commented Jun 18, 2018

Done, will be in next daily.
This can be done with

version: "3"
services:
  shokoserver:
    container_name: shokoserver
    image: cazzar/shokoserver:daily
    ports:
      - 8111:8111
    volumes:
      - /example/vol
    environment: 
      - SHOKO_MySQL_Hostname=db
      - SHOKO_MySQL_SchemaName=shoko_linux
      - SHOKO_MySQL_Username=shoko
      - SHOKO_MySQL_Password=example
    links:
      - mariadb:db
    depends_on:
      - mariadb
    environment:
      - PUID=1000
      - PGID=100
    restart: unless-stopped

@hergonoway
Copy link

Hi sorry for the dumb question but I didn't find any updated doc about these new environment values (shoko doc, docker hub, etc.) , is there a list somewhere ?

@da3dsoul
Copy link
Member

From the code, it looks like you can pass any setting in the settings.json, just prepend "SHOKO_" to it

@Cazzar
Copy link
Member

Cazzar commented Sep 30, 2018

Yep, that's it... But it's also shown in my example above.

@da3dsoul
Copy link
Member

Yeah, but we couldn't tell from just that if it's all settings or just a set few.

@hergonoway
Copy link

that's awesome to buildup the settings from the run command through env variables, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants