szabodanika / microbin

A secure, configurable file-sharing and URL shortening web app written in Rust.
https://microbin.eu
BSD 3-Clause "New" or "Revised" License
2.65k stars 163 forks source link

Pass arguments when using docker-compose? #99

Closed streiman closed 1 year ago

streiman commented 1 year ago

I just found microbin and like it very much. Deployed it using docker-compose. The docker image works perfect and I can access microbin, even using traefik.

But there are several options like --public-path --private or --qr - how can I pass them to microbin using docker-compose.yaml? I couldn't find anything in the documentation.

szabodanika commented 1 year ago

Hello, every flag is also available as an environment variable. See https://github.com/szabodanika/microbin/blob/master/src/args.rs. I will put this into the documentation asap

streiman commented 1 year ago

Thanks, that works perfectly.

Jimmy2027 commented 1 year ago

Thanks! I managed with this docker-compose.yml file (starting service with docker compose up -d):


services:
  paste:
    image: microbin-docker
    restart: always
    env_file:
      - /my/microbin/.env
    ports:
     - "8080:8080"
    volumes:
     - ./microbin-data:/my/microbin

and this /my/microbin/.env file:

MICROBIN_TITLE="Hello World"
MICROBIN_QR=True
MICROBIN_HIDE_FOOTER=True