How can I build it using docker? #295
Answered
by
maximkrouk
maximkrouk
asked this question in
Q&A
-
I anyone has a working Dockerfile, I'd be happy if you could share it, otherwise I'll probably share my Dockerfile here when I figure out how to implement it 🙂 |
Beta Was this translation helpful? Give feedback.
Answered by
maximkrouk
Feb 2, 2022
Replies: 1 comment
-
I'll use this prototype for now
FROM node:16
WORKDIR /app
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
# Files required by pnpm install
COPY .npmrc package.json pnpm-lock.yaml .
RUN pnpm install --frozen-lockfile --prod
RUN pnpm install esbuild
# Bundle app source
COPY . .
EXPOSE 8080
CMD ["pnpm", "prod"]
version: '3.7'
# dont know if it's needed, took the template from vapor (server-side swift framework)
x-shared_environment: &shared_environment
LOG_LEVEL: ${LOG_LEVEL:-debug}
services:
frontend:
image: capturecontext-frontend:latest
build:
context: capturecontext-frontend
environment:
<<: *shared_environment
ports:
- '8080:8080'
command: ["pnpm", "prod"] And I also added |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
maximkrouk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'll use this prototype for now
Dockerfile
docker-compose.yml