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 support #2

Open
eandersson opened this issue Oct 17, 2024 · 2 comments
Open

Docker support #2

eandersson opened this issue Oct 17, 2024 · 2 comments

Comments

@eandersson
Copy link

eandersson commented Oct 17, 2024

I use Docker to run this locally, but the workflow with postgres makes it a bit awkward to work with. Would it be possible add Docker support for building and deploying easier locally?

Right now I do something like this, but it is not ideal that the build process requires a db connection string.

FROM node:22-bookworm AS build

WORKDIR /build
COPY . .

ENV DATABASE_URL="postgresql://ckstats:<password>@192.168.0.100:5432/ckstats"
RUN npm install && npm run build

FROM node:22-bookworm

ENV DATABASE_URL="postgresql://ckstats:<password>@192.168.0.100:5432/ckstats"
ENV API_URL="http://192.168.0.100:8000/api/v1"
WORKDIR /ckstats

COPY --from=build /build .
@mrv777
Copy link
Owner

mrv777 commented Oct 17, 2024

I can take a look into this. Right now trying to optimize it as there is a memory issue, but can look at this after.
Would you want it to use a different db like sqlite so postgres isn't needed too? (Not sure how the performance will be with sqlite)

@eandersson
Copy link
Author

eandersson commented Oct 17, 2024

I use postgres for my setup. No rush as it's already working, but just a bit messy.

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

No branches or pull requests

2 participants