Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ COPY package*.json ./
RUN npm install --omit=dev

COPY . .
RUN mkdir -p /app/seed && cp /app/data/ingredients.json /app/seed/ingredients.json

ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV PORT=3333
ENV SQLITE_PATH=/app/data/chekit.sqlite
ENV INGREDIENTS_JSON=/app/seed/ingredients.json

RUN npm run import-data

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Important Render behavior:
- Render builds from `Dockerfile` via `runtime: docker`.
- The service binds to `HOST=0.0.0.0` and Render's `PORT=10000`.
- SQLite is stored on a persistent Render disk mounted at `/app/storage`.
- `preDeployCommand: npm run import-data` builds SQLite from `data/ingredients.json` before the service starts.
- `preDeployCommand: npm run import-data` builds SQLite from `/app/seed/ingredients.json` before the service starts.

Deploy steps:

Expand Down
2 changes: 2 additions & 0 deletions render.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ services:
value: 10000
- key: SQLITE_PATH
value: /app/storage/chekit.sqlite
- key: INGREDIENTS_JSON
value: /app/seed/ingredients.json
disk:
name: chekit-core-data
mountPath: /app/storage
Expand Down
Loading