Dockify app
This commit is contained in:
parent
1c9de06b66
commit
90d2257c17
2 changed files with 37 additions and 0 deletions
6
.dockerignore
Normal file
6
.dockerignore
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
**/node_modules
|
||||
**/.cache
|
||||
**/.DS_Store
|
||||
**/storage
|
||||
**/dist
|
||||
**/.env
|
||||
31
Dockerfile
Normal file
31
Dockerfile
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
FROM node:18
|
||||
RUN mkdir -p /usr/app
|
||||
WORKDIR /usr/app
|
||||
|
||||
ENV API_PATH="/api"
|
||||
|
||||
COPY game/package*.json ./
|
||||
RUN npm install --quite
|
||||
|
||||
COPY game .
|
||||
RUN npm run build
|
||||
|
||||
FROM node:18
|
||||
RUN mkdir -p /usr/app/public
|
||||
WORKDIR /usr/app
|
||||
|
||||
ENV STATIC="/usr/app/public"
|
||||
ENV PORT=80
|
||||
EXPOSE 80/tcp
|
||||
|
||||
COPY --from=0 /usr/app/dist ./public
|
||||
|
||||
COPY server/package*.json ./
|
||||
RUN npm install --quite
|
||||
|
||||
COPY server .
|
||||
RUN mkdir -p storage
|
||||
RUN cp .env.example .env
|
||||
RUN sed -i "s#HVuwh1dmaFhg4q1fef7xI4D6UeV7ImGK6NTp7i9eH6qiyJ9kxsvqPu29JXnhNGQY#$(head -c 12 /dev/random | base64)#" .env
|
||||
|
||||
CMD ["npm", "run", "start"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue