update dockerfile
This commit is contained in:
parent
f5b63dd3b4
commit
701ae51bc0
|
@ -1,4 +1,5 @@
|
|||
Dockerfile
|
||||
.dockerignore
|
||||
LICENSE
|
||||
.gitea
|
||||
.gitea
|
||||
.git
|
21
Dockerfile
21
Dockerfile
|
@ -2,22 +2,25 @@ FROM node:lts-bullseye-slim
|
|||
|
||||
ARG VERSION
|
||||
|
||||
RUN apt update
|
||||
RUN apt install -y git
|
||||
|
||||
RUN git clone --depth 1 --branch ${VERSION} https://github.com/AmruthPillai/Reactive-Resume.git app
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y git
|
||||
|
||||
RUN npm install -g pnpm pm2
|
||||
|
||||
RUN git clone --depth 1 --branch ${VERSION} https://github.com/AmruthPillai/Reactive-Resume.git /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
RUN pnpm install --frozen-lockfile
|
||||
RUN pnpm build
|
||||
|
||||
COPY . .
|
||||
COPY .env /data/.env.template
|
||||
COPY entrypoint.sh /data/entrypoint.sh
|
||||
COPY ecosystem.config.js /data/ecosystem.config.js
|
||||
|
||||
RUN cp .env /tmp/.env
|
||||
RUN mv entrypoint.sh /usr/bin/entrypoint.sh && chmod a+x /usr/bin/entrypoint.sh
|
||||
RUN chmod a+x /data/entrypoint.sh
|
||||
|
||||
ENTRYPOINT [ "/usr/bin/entrypoint.sh" ]
|
||||
CMD [ "pm2-runtime", "ecosystem.config.js" ]
|
||||
ENTRYPOINT [ "/data/entrypoint.sh" ]
|
||||
CMD [ "pm2-runtime", "/data/ecosystem.config.js" ]
|
|
@ -1,11 +1,11 @@
|
|||
module.exports = [
|
||||
{
|
||||
script: "pnpm start --filter server",
|
||||
script: "pnpm --filter server start",
|
||||
cwd: "/app",
|
||||
name: "server",
|
||||
},
|
||||
{
|
||||
script: "pnpm start --filter client",
|
||||
script: "pnpm --filter client start",
|
||||
cwd: "/app",
|
||||
name: "client",
|
||||
},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -f .env ]; then
|
||||
cp /tmp/.env .
|
||||
cp /data/.env.template .env
|
||||
fi
|
||||
|
||||
set -a
|
||||
|
|
Reference in New Issue