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

Environment config not working #24

Closed
Wishdream opened this issue Aug 11, 2022 · 7 comments
Closed

Environment config not working #24

Wishdream opened this issue Aug 11, 2022 · 7 comments

Comments

@Wishdream
Copy link

I'm currently using the docker-compose given via portainer
and provides the following error:

Couldn't read config
Missing field: 'DISCORD_TOKEN'

All my environment vars are set and just following the provided docker-compose file:

version: '3.4'

services:
  aoede:
    image: codetheweb/aoede
    restart: always
    volumes:
      - ./aoede:/data
    environment:
      - DISCORD_TOKEN=discord.token.here
      - SPOTIFY_USERNAME=spotitest
      - SPOTIFY_PASSWORD=notarealpassword
      - DISCORD_USER_ID=targeteduserIDhere

I think it's trying to read the config.toml where it shouldn't exist or somehow got bundled with the docker image

@nodgear
Copy link

nodgear commented Aug 12, 2022

This issue seems to be related to the fix attempt by on #15
Partially reported on #16

@oleggtro
Copy link
Contributor

Yeah, I think the problem got introduced in #18.
Serdes rename macro somehow messes with figments ability to deserialize the config properly.
I was able to reproduce this issue and fix it by removing the macro.

The easiest way to fix this would probably be ditching figment all together and moving towards dotenv (and relying on a .env file or env vars for configuration). What do you think @codetheweb?

@oleggtro
Copy link
Contributor

The issues are not related btw :)

@oleggtro
Copy link
Contributor

#25 should fix your issue @Wishdream.
Please wait until a build for 87dc75e is published (or build it yourself if you're able to) and try the fix



The easiest way to fix this would probably be ditching figment all together and moving towards dotenv (and relying on a .env file or env vars for configuration). What do you think @codetheweb?

I don't know if thats really required. I don't really like the fix(#25) though.

@Wishdream
Copy link
Author

Wishdream commented Aug 13, 2022

#25 should fix your issue @Wishdream. Please wait until a build for 87dc75e is published (or build it yourself if you're able to) and try the fix

Going to build it myself for now, at least until there's an agreed-upon fix.
Not exactly resolved yet so I'll keep this open for now.

@oleggtro
Copy link
Contributor

Well, I can't merge into the main repo, thats why the fix isn't official yet.
Can you confirm it worked for you?

@codetheweb
Copy link
Owner

I would rather use .env over .toml but no strong preference.

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

No branches or pull requests

4 participants