fix: ๐Ÿ› docker files

This commit is contained in:
Anthony Potdevin 2020-08-09 16:03:18 +02:00
parent 56998d0c90
commit e274e3d57b
No known key found for this signature in database
GPG Key ID: 4403F1DFBE779457
4 changed files with 52 additions and 9 deletions

View File

@ -12,7 +12,14 @@ RUN apk add --update --no-cache \
# Install app dependencies
COPY package.json .
COPY package-lock.json .
RUN npm install --production --silent
RUN npm install --silent
# Build the NextJS application
COPY . .
RUN npm run build
# Remove non production necessary modules
RUN npm prune --production
# ---------------
# Build App
@ -21,12 +28,12 @@ FROM node:12.16-alpine
WORKDIR /app
# Copy dependencies from build stage
# Copy dependencies and build from build stage
COPY --from=build node_modules node_modules
COPY --from=build .next .next
# Bundle app source
COPY . .
RUN npm run build
EXPOSE 3000
CMD [ "npm", "start" ]

View File

@ -12,7 +12,14 @@ RUN apk add --update --no-cache \
# Install app dependencies
COPY package.json .
COPY package-lock.json .
RUN npm install --production --silent
RUN npm install --silent
# Build the NextJS application
COPY . .
RUN npm run build
# Remove non production necessary modules
RUN npm prune --production
# ---------------
# Build App
@ -21,12 +28,12 @@ FROM arm32v7/node:12.16-alpine
WORKDIR /app
# Copy dependencies from build stage
# Copy dependencies and build from build stage
COPY --from=build node_modules node_modules
COPY --from=build .next .next
# Bundle app source
COPY . .
RUN npm run build
EXPOSE 3000
CMD [ "npm", "start" ]

View File

@ -12,7 +12,14 @@ RUN apk add --update --no-cache \
# Install app dependencies
COPY package.json .
COPY package-lock.json .
RUN npm install --production --silent
RUN npm install --silent
# Build the NextJS application
COPY . .
RUN npm run build
# Remove non production necessary modules
RUN npm prune --production
# ---------------
# Build App
@ -21,12 +28,12 @@ FROM arm64v8/node:12.16-alpine
WORKDIR /app
# Copy dependencies from build stage
# Copy dependencies and build from build stage
COPY --from=build node_modules node_modules
COPY --from=build .next .next
# Bundle app source
COPY . .
RUN npm run build
EXPOSE 3000
CMD [ "npm", "start" ]

View File

@ -0,0 +1,22 @@
version: '3'
services:
thunderhub:
image: apotdevin/thunderhub:test-amd64
restart: unless-stopped
stop_signal: SIGKILL
environment:
# BASE_PATH: '/thub'
# COOKIE_PATH: '/data/.cookie'
# SSO_SERVER_URL: 'lnd_bitcoin:10009'
# SSO_MACAROON_PATH: '/etc/lnd'
# SSO_CERT_PATH: '/etc/lnd/tls.cert'
# NO_CLIENT_ACCOUNTS: 'true'
ACCOUNT_CONFIG_PATH: '/data/thubConfig.yaml'
LOG_LEVEL: debug
volumes:
- D:/data:/data
ports:
- '3000:3000'
expose:
- '3000'
command: ['npm', 'run', 'start']