Skip to content

Conversation

@yoursdearboy
Copy link

@yoursdearboy yoursdearboy commented May 29, 2025

Blocked by:


Our team recently started working with ODK, and it wasn't easy for novice developers to run a development environment. We've successfully used devcontainers in other projects for a reproducible development environment and working on a server. This is the config we are using.

This PR includes commits from PRs #1110 and #1112 to make it works.

Also, it requires next changes to Vite config in client getodk/central-frontend#1274

What has been done to verify that this works as intended?

Started dev container using Visual Studio Code as per updated README.

Before submitting this PR, please make sure you have:

  • branched off and targeted the next branch OR only changed documentation/infrastructure (master is stable and used in production)
  • verified that any code or assets from external sources are properly credited in comments or that everything is internally sourced

assert_size /etc/secrets/enketo-secret 64
assert_size /etc/secrets/enketo-less-secret 32
assert_size /etc/secrets/enketo-api-key 128
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is already being discussed at #1110

Copy link
Contributor

@alxndrsn alxndrsn Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1423 implementation should be used in favour of changes here

PGUSER: jubilant
POSTGRES_INITDB_ARGS: -U jubilant
POSTGRES_PASSWORD: jubilant
POSTGRES_DB: jubilant
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sadiqkhoja how is docker-compose.dev.yml/make dev currently working without this postgres config? Presumably falling back to values defined at

environment:
POSTGRES_USER: odk
POSTGRES_PASSWORD: odk
POSTGRES_DB: odk
and
environment:
PGUSER: odk
POSTGRES_INITDB_ARGS: -U odk
POSTGRES_PASSWORD: odk
POSTGRES_DB: odk
, but I can't see how these would work with central-backend running in dev mode.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that #1112 is already asking the same question.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually create odk user in the dev db manually. I don't recreate database container as often so it's not a big deal for me.

@sadiqkhoja
Copy link
Contributor

Thanks for this PR. In the past we have seen other community members interested in running whole dev setup in containers but we parked that work until we have a clear and simple option to have following developer features:

  1. debugging / breakpoints
  2. hot-reload

Does this PR supports above two features?

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.

4 participants