feat: docker deployment with compose quickstart
This commit is contained in:
8
.dockerignore
Normal file
8
.dockerignore
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
node_modules
|
||||||
|
server/dist
|
||||||
|
web/dist
|
||||||
|
data
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
*.log
|
||||||
|
.DS_Store
|
||||||
31
Dockerfile
Normal file
31
Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# ---- build stage: deps + compile + test ----
|
||||||
|
FROM node:22-slim AS build
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install build tools as a fallback for native modules without prebuilds
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends python3 make g++ \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
RUN npm ci
|
||||||
|
|
||||||
|
COPY tsconfig.json vitest.config.ts ./
|
||||||
|
COPY server ./server
|
||||||
|
RUN npm run build:server && npm test
|
||||||
|
|
||||||
|
# ---- runtime stage ----
|
||||||
|
FROM node:22-slim
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
COPY --from=build /app/node_modules ./node_modules
|
||||||
|
COPY --from=build /app/server/dist ./server/dist
|
||||||
|
|
||||||
|
ENV PORT=3000
|
||||||
|
ENV DATA_DIR=/data
|
||||||
|
VOLUME /data
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
CMD ["node", "server/dist/index.js"]
|
||||||
28
README.md
28
README.md
@@ -1,3 +1,29 @@
|
|||||||
# record-shop
|
# record-shop
|
||||||
|
|
||||||
Easily manage a physical collection of music.
|
Easily manage a physical collection of music.
|
||||||
|
|
||||||
|
Scan barcodes with your phone to catalogue vinyl, CDs and cassettes, pull
|
||||||
|
metadata from Discogs, and see what you have (and haven't) ripped into your
|
||||||
|
Subsonic-compatible music server (Navidrome, Gonic, Airsonic, LMS, …).
|
||||||
|
|
||||||
|
## Quickstart
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
Open <http://localhost:3000>, create the admin account, then add your Discogs
|
||||||
|
token and (optionally) your Subsonic server details in Settings.
|
||||||
|
|
||||||
|
- Data lives in `./data` (SQLite database + cached cover art).
|
||||||
|
- Configure via env if you prefer: `PORT`, `DATA_DIR`.
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm install
|
||||||
|
npm test # vitest
|
||||||
|
npm run dev:server
|
||||||
|
```
|
||||||
|
|
||||||
|
Spec: `docs/superpowers/specs/2026-08-29-record-shop-design.md`
|
||||||
|
|||||||
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
services:
|
||||||
|
record-shop:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
restart: unless-stopped
|
||||||
Reference in New Issue
Block a user