-
Notifications
You must be signed in to change notification settings - Fork 109
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
Provide a Docker image #7
Comments
Subscribed to this issue. When there's a docker image, I'm deffo gonna try it! |
I've had a quick shot at it but when running
Which makes sense per the setup tutorial from the README. Yet compiling these credentials into the image statically is not what we want. |
+1 on the docker image. |
@m3shat would you care to share what got you to that point? I have more experience with NextJS than I do making Docker images (which is to say barely any), but it looks like we may need to just provide default values for those environment variables, and/or provide them when the image starts. Might be a great opportunity to write an example Docker Compose file. |
@alexfornuto See my temporary fork or this FROM node:18-alpine as builder
WORKDIR /build
COPY . /build
ENV NEXT_TELEMETRY_DISABLED 1
RUN npm install --omit=dev && npm run build
# ↑ this is where that "Invalid environment variable" error occurs
FROM node:18-alpine AS runner
WORKDIR /app
ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next
COPY --from=builder /build/node_modules ./node_modules
COPY --from=builder /build/package.json ./package.json
USER nextjs
EXPOSE 3000
ENV PORT 3000
CMD ["npm", "start"] The dockerfile is heavily inspired from what is written in this blog. |
thanks @m3shat! I managed to build a docker container without statically embedding the environment variables. https://github.com/MarconLP/snapify/pkgs/container/snapify
|
Consider re-opening this and considering it closed once there are complete instructions for using this with docker. For example, how should one provide the variables to the internal application? Maybe a docker compose example with accompanying database? |
+1 on what @alexfornuto said ! Could we keep this open till we have documented way of using variables i.e. ports etc. |
@alexfornuto @vikramwalia you need the following basic configuration to run it in docker: PostgreSQL Snapify but you will then get a copy of the https://snapify.it/ site hosted in your environment which does not look good for a production env yet. but big up for the project! |
opening because of the lack of documentation |
How did you managed to build it? For me it is giving following error
Do we have any specific instructions on building the Docker Image .. I tried it with the Dockerfile in the main branch |
The docker image also requires environment variables that I don't think should be needed to run locally, like the AWS and GitHub keys. I'd really love to run this locally, but so far it seems to only be suitable for developers working on the project itself. |
I wanted to selfhost and try this out - but the lack of a docker image and clear instructions is a problem for me as I am not a developer. From above comments, looks like other have tried to build a custom image, Is there anyone that has built a image that doesnt need any external services like aws / etc ? |
Seeing no update to to the repo's single branch in 6 months, I'm afraid that this project may no longer be maintained. |
Provide a docker image for self-hosted deployment.
A matching docker compose file as an example would also be a good idea I think.
This also provides a quick way to try out the application for new users.
The text was updated successfully, but these errors were encountered: