-
Notifications
You must be signed in to change notification settings - Fork 36
feat(Docker): Added Docker file + compose for local dev #22
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
base: dev
Are you sure you want to change the base?
Conversation
6e10356
to
9002e20
Compare
9002e20
to
427d3c8
Compare
d812f22
to
3557bbe
Compare
3557bbe
to
8651ef2
Compare
- postgres | ||
volumes: | ||
- .:/app | ||
command: ["sh", "-c", "npm install && npm run dev"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't npm ci && npm run dev
be more intentional about packages?
# Base Stage | ||
FROM node:22.14.0-bullseye-slim AS base | ||
WORKDIR /app | ||
COPY package.json package-lock.json ./ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really should be be moved down.
FROM base AS deps
COPY package.json package-lock.json ./
RUN npm ci
CMD ["sh", "-c", "npm run dev"] | ||
|
||
# Production Stage | ||
FROM node:22.14.0-bullseye-slim AS prod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be
FROM base AS prod
(and the WORKDIR line here deleted)
This supersedes #20 and #19
I tried to keep this PR minimal but it kept growing as I needed to make sure that the production container could build
docker compose up --build
to start the local envDocker build commands