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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable devevelopment port & documentation updates #6234

Merged
merged 7 commits into from
Feb 3, 2024

Conversation

spwoodcock
Copy link
Member

@spwoodcock spwoodcock commented Feb 2, 2024

Problem

  • The docker compose setup for development uses Traefik on port 80.
  • On many machines port 80 is not an option: either in use, or not available in rootless mode.
  • The container names are also a mix of conventions: two being automatically generated, two being manually specified.
  • The development setup guide is also missing a few things to get started easily.

Solution

  • Added a TM_DEV_PORT variable to the dotenv options, so the port can be configured.
  • Updated all containers to have consistent names. I prepended tm- to prevent conflict with other tools that may have containers named backend and frontend.
  • Updated the development setup guide:
    • Info on running via docker.
    • How to set up OSM OAuth creds.

Context

  • @robsavoye was having some issues setting up Tasking Manager for testing.
  • I realised there isn't actually a guide for running the entire stack in Docker during development, which I assume some people would want to do.

2024-02-02 15:35 Update/Edit:

  • I removed info about using pep582, as this was blocked by the python steering comity (馃槩)
  • I noticed an unpinned pdm version during functional tests in CI. I pinned to the same as others in the repo.
  • Clarified info about running backend api only.

@robsavoye
Copy link
Contributor

There are two different docs on using docker with TM, but since docker wasn't working, I could update and merge the two docs.

@spwoodcock
Copy link
Member Author

Where is the second doc? I couldn't find it.

I found a guide for installing TM via docker for deployment, but no complete guide for running via docker during development.

@robsavoye
Copy link
Contributor

one is in docs-old, the other in in an old PR from Outreachy last year. I'm trying to get rid of docs-old by updating the docs, and moving them all to docs. Once I can get docker to work, I can merge and update a single doc.

@robsavoye
Copy link
Contributor

The old one I was planning to merge in is here: #5621. You're welcome to update a doc on docker usage for TM. :-)

@spwoodcock
Copy link
Member Author

Looks fine to me - that one is for deployment specifically though.

I know they are similar, but we need a doc for how to deploy, and a doc for how to develop using docker.

@robsavoye
Copy link
Contributor

For a doc on docker, I was thinking about a simple howto user guide. Basically an interested contributor should be able to clone the TM git repo, run docker-compose, and try TM in a self-hosted environment. I do this all the time when evaluating other projects, and if it doesn't work out of the box, that ends the evaluation most of the time.

Copy link

sonarcloud bot commented Feb 2, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@spwoodcock
Copy link
Member Author

To do that I think we should just update the example.env to use defaults for the docker based setup.

Then change the port binded to traefik by default to any >1024.

After that a user could simply:

git clone https://github.com/hotosm/tasking-manager

cp example.env tasking-manager.env

docker compose up -d

@robsavoye
Copy link
Contributor

I like making it really easy for people to download and evaluate TM locally using docker.

@robsavoye robsavoye merged commit b694e28 into hotosm:develop Feb 3, 2024
6 checks passed
@spwoodcock
Copy link
Member Author

spwoodcock commented Feb 3, 2024

I will make another PR (next week) updating as above & adding some info to the docs then 馃憤

@spwoodcock spwoodcock deleted the build/add-dev-port branch February 3, 2024 16:25
@ramyaragupathy ramyaragupathy added this to the v4.7.1 milestone Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants