Skip to content

feat(Docker): Added Docker file + compose for local dev #22

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

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

timothystewart6
Copy link

@timothystewart6 timothystewart6 commented Feb 21, 2025

This supersedes #20 and #19

I tried to keep this PR minimal but it kept growing as I needed to make sure that the production container could build

  • Updated docs
  • Added docker compose with Docker file and overrides
  • compose runs postgres (along with health check) and runs the build version of your code, logs to console
  • added devcontainer
  • All the developer needs to do is clone repo and run docker compose up --build to start the local env
  • Dockerfile can be used for dev and prod
  • Moved some devDeps that were in deps

Docker build commands

dev
docker build --target dev --build-arg NODE_ENV=development -t cloud-api-dev .
docker run -p 3000:3000 -e NODE_ENV=development cloud-api

prod
docker build --target prod --build-arg NODE_ENV=production -t cloud-api-prod .
docker run -p 3000:3000 -e NODE_ENV=production cloud-api

@timothystewart6 timothystewart6 force-pushed the docker-dev branch 2 times, most recently from 6e10356 to 9002e20 Compare February 21, 2025 03:49
@timothystewart6 timothystewart6 force-pushed the docker-dev branch 3 times, most recently from d812f22 to 3557bbe Compare February 22, 2025 03:23
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.

1 participant