Closed ohbob closed 1 year ago
Yeah I probably shouldn't have uploaded the docker files those weren't really part of the project. Those were for a personal deployment and do not contain all of the docker images necessary to run it. Basically I would recommend deploying it to vercel as you can do that for free and you can setup a db there too. The example demo is deployed there. I have removed the docker files. Thanks for pointing those files out. You can run this project by setting your prisma DB url and running npm install then npm run dev like any sveltekit project.
Glad you are enjoying the project!
here is a Dockerfile that works for svelte apps.
FROM node:lts-alpine as builder
# Set the working directory to /app
WORKDIR /app
# Copy the rest of the app's files to the container
COPY . /app
COPY .env ./
# Install dependencies
RUN npm i
# run prisma generate
RUN npx prisma generate
# Build the web app
RUN npm run build
# Stage 2
FROM node:lts-alpine
WORKDIR /app
COPY --from=builder /app/build /app/build
COPY --from=builder /app/node_modules /app/node_modules
COPY --from=builder /app/package.json /app/package.json
# Expose port 3000
EXPOSE 3000
ENV PORT 3000
# Start the app
ENTRYPOINT ["node", "build"]
# CMD ["node", "./index.js"]
Great project!
Wanted to try it out, but run in to issues. Here is what I did. Am I missing something?