-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.demo
50 lines (30 loc) · 1.12 KB
/
Dockerfile.demo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM nixos/nix
RUN mkdir /app
WORKDIR /app
COPY flake.nix flake.nix
COPY flake.lock flake.lock
# Cache some requirements in /nix/store
RUN echo "extra-experimental-features = nix-command flakes" >> /etc/nix/nix.conf
RUN nix develop
ENV NEXT_TELEMETRY_DISABLED 1
ENV NEXT_PUBLIC_BASE_PATH ""
RUN mkdir -p /home/appuser
RUN nix-shell -p busybox.out --run 'adduser -D -u 1000 appuser && \
chown -R appuser:appuser /nix && \
chown -R appuser:appuser /app'
EXPOSE 3000
ENV HOSTNAME "0.0.0.0"
COPY . /app
RUN chown -R appuser:appuser -R /app
WORKDIR /app
USER 1000:1000
RUN nix develop --command bash -c 'bun i && bun build:packages'
ENV DATABASE_URL "file:/app/prisma/dev.db"
RUN nix develop --command bash -c 'bun run build:prisma && \
bun run prisma:exhibition:generate && \
prisma migrate dev --name initial --schema ./prisma/exhibition.prisma'
RUN nix develop --command bash -c 'bun run cli flatImport ./manifestation/exhibition/import/Konvolut_NewYork_2024-07-14.csv -m NewYork -n 10'
EXPOSE 3001
EXPOSE 5762
COPY ./.env.example /apps/exhibition-live/.env.local
CMD nix develop --command bash -c 'bun run start'