forked from agnaistic/agnai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (26 loc) · 785 Bytes
/
Dockerfile
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
FROM node:18.18.2-bullseye-slim
WORKDIR /app
VOLUME [ "/app/db" ]
VOLUME [ "/app/assets" ]
VOLUME [ "/app/dist/assets" ]
VOLUME [ "/app/extras" ]
RUN npm install [email protected] -g
ARG SHA=unknown
ADD package.json pnpm-lock.yaml ./
RUN pnpm i --frozen-lockfile
ADD public.ts pyproject.toml poetry.lock tailwind.config.js tsconfig.json .babelrc .postcssrc .prettierrc srv.tsconfig.json ./
ADD common/ ./common/
ADD srv/ ./srv/
ADD web/ ./web
RUN pnpm run build:server && \
sed -i "s/{{unknown}}/${SHA}/g" /app/web/index.html && \
pnpm run build && mkdir -p /app/assets && \
echo "${SHA}" > /app/version.txt
ENV LOG_LEVEL=info \
INITIAL_USER=administrator \
DB_NAME=agnai \
ASSET_FOLDER=/app/dist/assets
EXPOSE 3001
EXPOSE 5001
ENTRYPOINT [ "pnpm" ]
CMD ["run", "server"]