docker
This commit is contained in:
parent
f2dc32a88b
commit
0cb620b302
3
.env.example
Normal file
3
.env.example
Normal file
@ -0,0 +1,3 @@
|
||||
PUBLIC_API_URL=
|
||||
PUBLIC_FRONTEND_URL=
|
||||
PUBLIC_SITES_URL=
|
16
Dockerfile
Normal file
16
Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
FROM node:18-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY package*.json .
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
RUN npm prune --production
|
||||
|
||||
FROM node:18-alpine
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/build build/
|
||||
COPY --from=builder /app/node_modules node_modules/
|
||||
COPY package.json .
|
||||
EXPOSE 3000
|
||||
ENV NODE_ENV=production
|
||||
CMD [ "node", "build" ]
|
@ -1,5 +1,7 @@
|
||||
import { PUBLIC_API_URL, PUBLIC_FRONTEND_URL, PUBLIC_SITES_URL } from '$env/static/public';
|
||||
|
||||
export const config = {
|
||||
api_url: "http://localhost:3000",
|
||||
frontend_url: "localhost:3002",
|
||||
sites_url: "127.0.0.1.nip.io:3001"
|
||||
api_url: PUBLIC_API_URL,
|
||||
frontend_url: PUBLIC_FRONTEND_URL,
|
||||
sites_url: PUBLIC_SITES_URL
|
||||
}
|
Loading…
Reference in New Issue
Block a user