Skip to content

moved docker compose to infra/local!#18

Merged
auroter merged 2 commits intomainfrom
task/sean/docker
Jan 30, 2023
Merged

moved docker compose to infra/local!#18
auroter merged 2 commits intomainfrom
task/sean/docker

Conversation

@auroter
Copy link
Contributor

@auroter auroter commented Jan 27, 2023

Wilfredo and I pair coded to move the docker-compose into infra, so that we can simultaneously debug the platform-admin-api and the main api at the same time if needed. The readme has been updated to include the commands required in order to run and debug in this manner. See other PR:

String-xyz/string-api#102

To test: (Instructions are now also included in readme.md in the main API)

  1. Ensure you have the platform-admin-api repo
  2. On platform-admin-api repo, checkout task/sean/str-373
  3. Make sure to copy .env.example into your .env. The .env.example was updated to reflect the correct postgres and redis values.
  4. Ensure you have the infra repo
  5. On the infra repo, checkout task/sean/docker
  6. Ensure you have the string-api repo
  7. On the string-api repo, checkout task/sean/docker-readme

You can run docker compose from any repo now, and it will compose string-api, platform-admin-api, postgres and redis.

Some initial sanitation: [do this from the infra repo]

  1. cd local
  2. docker compose down
  3. docker system prune (/y)
  4. docker volume prune (/y)

And then this can be run from any repo:
4) docker compose -f ../infra/local/docker-compose.yml up

You should automatically get console output from whichever repo you run the previous command from. To get live console output from the other repo:

  1. docker ps to list the docker container names
  2. docker logs [docker container name] -f
  3. for example, docker logs platform-admin-api -f or docker logs string-api -f from a terminal in the repo you did not run the docker compose from

ocasta181
ocasta181 previously approved these changes Jan 28, 2023
@auroter auroter merged commit 0072a77 into main Jan 30, 2023
@auroter auroter deleted the task/sean/docker branch January 30, 2023 20:34
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