Skip to content

Env fix#41

Open
matthewlefler wants to merge 15 commits intodevfrom
env-fix
Open

Env fix#41
matthewlefler wants to merge 15 commits intodevfrom
env-fix

Conversation

@matthewlefler
Copy link
Copy Markdown

@matthewlefler matthewlefler commented Apr 23, 2026

What

  • app.rs
    • get_app_data()
      • use env variables given in template in README.md
  • test files
    • changes all api request routes from route to api/route
  • dockerfiles
    • rust:1.70-slim-buster -> rust:1.94.0-slim-trixie for
      • /Dockerfile
      • /Dockerfile.test
      • /Dockerfile.local
  • docker compose files
    • use new env variables in devcade-api environment for
      • docker-compose.yml
      • docker-compose.test.yml

Why

Application did not use the environmental variables stated in the README.md
Tests did not run correctly all throwing 404 errors

Test Plan

Ran tests using

sudo podman compose -f docker-compose.test.yml run --rm devcade-api

Env Vars

Changed

  • DOMAIN to ALLOWED_ORIGIN
    • to better match the purpose of it and to increase readability
      replaced
  • SQL_URI with
    • PSQL_PORT
    • PSQL_USER
    • PSQL_PASS
    • PSQL_URI

Documentation

added env.template copy paste instructions to README.md
added testing section and example command to README.md
updated routes doc url because its a simple one line change

Note that this changes the .env file and as such the file for the container running on OKD will need to be updated (if i am correct)

Checklist

  • Tested all changes locally
    Runs, tests fail but this is due to most likely previous PRs making the test code invalid, not something this PR touched
    test result: FAILED. 32 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s

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

Successfully merging this pull request may close these issues.

3 participants