-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (36 loc) · 957 Bytes
/
Dockerfile
File metadata and controls
44 lines (36 loc) · 957 Bytes
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
FROM node:22-alpine as apibuild
# Install python3 into the deps of the container. For the argon bug : 2022-05-30 : Error: Error loading shared library /api/node_modules/argon2/lib/binding/napi-v3/argon2.node: Exec format error
RUN apk update \
&& apk --no-cache --virtual build-dependencies add \
python3 \
make \
g++ \
git \
openssh \
mongodb-tools \
&& npm install -g node-gyp \
&& npm install -g @mapbox/node-pre-gyp
## API
RUN mkdir -p /api
WORKDIR /api
COPY ./package.json .
COPY ./package-lock.json .
COPY ./src .
COPY ./views .
COPY ./public .
COPY ./doc .
COPY ./logs .
COPY ./migrations .
COPY ./.env .
COPY ./tsconfig.json .
COPY ./nodemon.json .
#COPY ./migrate.json .
#npx migrate up &&
RUN npm install
# Argon2 prebuild library seem off. We rebuild them all with this.
RUN npm rebuild
RUN npm rebuild argon2
EXPOSE 8000
#RUN npx migrate up
ENTRYPOINT ["npm"]
CMD ["run","dev"]