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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Make docker compose prod and add dev extension #175

Merged
merged 29 commits into from
Jun 17, 2024

Conversation

topher-lo
Copy link
Contributor

@topher-lo topher-lo commented Jun 16, 2024

Resolves discussion in Discord self-hosted help channel. See thread.

Screenshot 2024-06-16 at 1 59 25 PM

What changed?

  • Added new docker-compose.dev.yml file
  • Added new multi-stage production next.js Dockerfile
  • Prod extension removes all volume bindings
  • Prod extension points to production next.js Dockerfile
  • Change into a non-privileged user to run the container
  • NOTE: fixed a bunch of outstanding frontend linting errors as well

To spin up local prod:
docker compose up

To spin up local dev:
docker compose -f docker-compose.yml -f docker-compose.dev.yml up

Reference: https://docs.docker.com/compose/multiple-compose-files/merge/

Important note

In the future, must remember to graceful error handling for server side components to avoid build next.js prerender errors.

QA

  • Ran docker compose up and docker compose -f docker-compose.yml -f docker-compose.dev.yml up
  • Manual testing frontend

@topher-lo topher-lo added the build Build system and package dependency changes label Jun 16, 2024
@topher-lo topher-lo self-assigned this Jun 16, 2024
@github-actions github-actions bot added engine Improvements or additions to the workflow engine frontend Improvements or additions to the frontend labels Jun 16, 2024
@topher-lo topher-lo removed the frontend Improvements or additions to the frontend label Jun 16, 2024
@topher-lo
Copy link
Contributor Author

@daryllimyt need assistance regarding linting errors from pnpm build. Please see internal comms.

@github-actions github-actions bot added the frontend Improvements or additions to the frontend label Jun 17, 2024
@topher-lo topher-lo changed the title build: Add docker compose prod extension build: Make docker compose prod and add dev extension Jun 17, 2024
@topher-lo topher-lo merged commit df62af6 into main Jun 17, 2024
4 checks passed
@topher-lo topher-lo deleted the build/docker-compose-local-prod branch June 17, 2024 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build system and package dependency changes engine Improvements or additions to the workflow engine frontend Improvements or additions to the frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants