diff --git a/.env b/.env index 55ff97d..d760de1 100644 --- a/.env +++ b/.env @@ -1,3 +1,4 @@ NEXT_PUBLIC_BASE_PATH=/ammo NEXT_PUBLIC_IMAGE_API_PATH=http://localhost:3000 -CATALOG_API_PATH=http://localhost:3000 \ No newline at end of file +CATALOG_API_PATH=http://localhost:3000 +DATABASE_URL=file:../db/ammo.db \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 604b068..d1c15c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,11 +21,8 @@ COPY . . ENV NEXT_TELEMETRY_DISABLED=1 -# RUN mkdir -p /app/db RUN npx prisma generate COPY prisma ./prisma/ -# If the /app/db/ammo.db file does not exist, generate it. -#RUN test -f /app/db/ammo.db || npx prisma db push RUN npm run build diff --git a/README.md b/README.md index 9cb576e..a83690f 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ cp .env.example .env.local | NEXT_PUBLIC_IMAGE_API_PATH | _N/A_ | Sti til bilde-APIet | | AUTH_API_PATH | _N/A_ | Sti til autentiserings-APIet | | CATALOG_API_PATH | http://localhost:8087/bikube | Sti til [katalog APIet ](https://github.com/NationalLibraryOfNorway/bikube)
Må starte med `http://` eller `https://` | +| DATABASE_URL | file:../db/ammo.db | Sti til databasefil (SQLite database) | Appen bruker SQLite for å holde orden på hvilke objekter som er låst til ulike brukere. AMMO bruker Prisma som ORM for å kommunisere med databasen.