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

Docker: Allow optional building of the frontend #4986

Open
wants to merge 7 commits into
base: staging
Choose a base branch
from

Conversation

jippi
Copy link
Contributor

@jippi jippi commented Mar 6, 2024

For Pixelfed users/forks that uses a modified frontend, this will allow them to use the new Docker setup out of the box.

With DOCKER_APP_BUILD_FRONTEND=0 (default)

By default no building will happen, just a couple of minor "wasteful" Docker build steps that are effectively NOOPs.

With DOCKER_APP_BUILD_FRONTEND=1

npm install --dev are installed in the intermediate image followed by npm run production that builds the frontend.

The new/updated files are then copied into the final container image, overriding the default pre-built assets.

Updating

  • Once merged, pull the change into your fork/repo
  • Run ./docker/dottie sync to update your existing .env file with the new one
  • Run ./docker/dottie set DOCKER_APP_BUILD_FRONTEND=1 to enable the new setting
  • Run docker compose build to kick off the build process
  • Run docker compose up -d to recreate your containers with the new custom frontend

@jippi jippi requested a review from dansup as a code owner March 6, 2024 21:42
@dansup
Copy link
Member

dansup commented Apr 6, 2024

@jippi Hey, can you target the staging branch?

@jippi jippi changed the base branch from dev to staging April 6, 2024 09:45
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.

None yet

2 participants