-
Notifications
You must be signed in to change notification settings - Fork 367
/
Dockerfile
38 lines (26 loc) · 981 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
36
37
38
FROM golang:latest
RUN rm /bin/sh && ln -s /bin/bash /bin/sh && \
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# Node
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 16.13.2
RUN mkdir -p $NVM_DIR && \
curl --silent -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash \
&& source $NVM_DIR/nvm.sh \
&& nvm alias default $NODE_VERSION \
&& nvm use default
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
# Install prisma command for automatic migrations.
RUN npm install --global prisma
# Install Taskfile
RUN sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
WORKDIR /server
ADD . .
# Install prisma client code generation tool and generate prisma bindings
RUN task generate
# Build the docs search index
RUN task docsindex
# Build the server binary
RUN task build
ENTRYPOINT [ "task", "production" ]