mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-19 03:29:37 +02:00
Dockerfile changes
This commit is contained in:
parent
08afaece2e
commit
b4eb35c591
4 changed files with 16 additions and 5 deletions
29
.docker/Dockerfile
Normal file
29
.docker/Dockerfile
Normal file
|
@ -0,0 +1,29 @@
|
|||
FROM node:14 as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm install --production
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN mkdir -p ./public ./data \
|
||||
&& cd ./client \
|
||||
&& npm install --production \
|
||||
&& npm run build \
|
||||
&& cd .. \
|
||||
&& mv ./client/build/* ./public \
|
||||
&& rm -rf ./client
|
||||
|
||||
FROM node:14-alpine
|
||||
|
||||
COPY --from=builder /app /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
EXPOSE 5005
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
CMD ["node", "server.js"]
|
26
.docker/Dockerfile.dev
Normal file
26
.docker/Dockerfile.dev
Normal file
|
@ -0,0 +1,26 @@
|
|||
FROM node:lts-alpine as build-front
|
||||
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./client .
|
||||
|
||||
RUN npm install --production \
|
||||
&& npm run build
|
||||
|
||||
FROM node:lts-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN mkdir -p ./public
|
||||
|
||||
COPY --from=build-front /app/build/ ./public
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD ["npm", "run", "skaffold"]
|
30
.docker/Dockerfile.multiarch
Normal file
30
.docker/Dockerfile.multiarch
Normal file
|
@ -0,0 +1,30 @@
|
|||
FROM node:14-alpine3.11 as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN apk --no-cache --virtual build-dependencies add python make g++ \
|
||||
&& npm install --production
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN mkdir -p ./public ./data \
|
||||
&& cd ./client \
|
||||
&& npm install --production \
|
||||
&& npm run build \
|
||||
&& cd .. \
|
||||
&& mv ./client/build/* ./public \
|
||||
&& rm -rf ./client
|
||||
|
||||
FROM node:14-alpine3.11
|
||||
|
||||
COPY --from=builder /app /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
EXPOSE 5005
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
CMD ["node", "server.js"]
|
10
.docker/docker-compose.yml
Normal file
10
.docker/docker-compose.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
version: '3'
|
||||
services:
|
||||
flame:
|
||||
image: pawelmalak/flame
|
||||
container_name: flame
|
||||
volumes:
|
||||
- /path/to/data:/app/data
|
||||
ports:
|
||||
- 5005:5005
|
||||
restart: unless-stopped
|
Loading…
Add table
Add a link
Reference in a new issue