microbin icon indicating copy to clipboard operation
microbin copied to clipboard

.env file provided by docker-setup.sh has incorrect examples

Open decaby7e opened this issue 1 year ago • 7 comments

Example:

# Hides the navigation bar on every page.
# Default value: 8080
export MICROBIN_HIDE_HEADER=false

# Hides the footer on every page.
# Default value: 8080
export MICROBIN_HIDE_FOOTER=false

# Hides the MicroBin logo from the navigation bar on every
# page.
# Default value: 8080
export MICROBIN_HIDE_LOGO=false

# Disables the /pastalist endpoint, essentially making all
# pastas private.
# Default value: 8080
export MICROBIN_NO_LISTING=false

decaby7e avatar Jul 12 '23 19:07 decaby7e

Yeah, those are definitely not the actual default values. I think in the documentation I fixed these but apparently not in the default .env? Thanks for catching this and letting me know! By the way, all boolean variables have false as their default value.

szabodanika avatar Jul 12 '23 20:07 szabodanika

I have a problem that is probably related to this. I use docker-compose with Portainer to deploy ma instance. I only use a few env-variables, like admin-PW, those are set correctly, but the ones I dont set (to get the default values/settings) dont match the defaults in the documentation, eg. Syntax-highlighting

simonl169 avatar Jul 16 '23 09:07 simonl169

@simonl169 that sounds annoying, can you say which ones seem to have different defaults from what's documented in the .env file? I should fix these ASAP

szabodanika avatar Jul 16 '23 11:07 szabodanika

I believe its basically every variable. Everyone is set to false or unset, except those I manually set. I screenshotted them and marked which I set manually, I unfortunately dont have time to compare to the documentation

Screenshot from 2023-07-16 13-25-18

I also append my docker-compose:

services:
  paste:
    image: danielszabo99/microbin:2.0.4
    restart: always
    ports:
     - "9013:8080"
    volumes:
     - microbin-data:/app/pasta_data
    environment:
      MICROBIN_ADMIN_USERNAME: redacted
      MICROBIN_ADMIN_PASSWORD: redacted
      MICROBIN_HIGHLIGHTSYNTAX: true
      MICROBIN_DEFAULT_EXPIRY: 1week
 
volumes:
  microbin-data:  

Maybe the standard .env file inside the container is not loaded correctly?

simonl169 avatar Jul 16 '23 11:07 simonl169

Just had a look at the docs and I'm correct. Any variable to be said true iby default in the docs is set to false here, eg. ENABLE_READONLY

simonl169 avatar Jul 16 '23 11:07 simonl169

I'm seeing something similar. With a blank environment file loaded, the CSS, dark mode etc renders correctly. As soon as I begin to use the default environment file, the CSS styling seems to disappear and the microbic logo vanishes too? See below.

Screenshot 2023-07-16 at 22 11 59

mcdent avatar Jul 16 '23 21:07 mcdent

I think the styling getting messed up has to do with the public path variable. In the console you will probably find errors about trying to load the styling and the logo from a nonexistent path. This is really strange behaviour that I am pretty sure I tested for before but I will have another look. In the meantime please do use the .env files (remember, without any configuration, your server will use the default admin login as well)

szabodanika avatar Jul 17 '23 05:07 szabodanika