This commit is contained in:
Omer Sabic 2024-05-29 19:24:54 +02:00
parent f2dc32a88b
commit 0cb620b302
3 changed files with 24 additions and 3 deletions

3
.env.example Normal file
View File

@ -0,0 +1,3 @@
PUBLIC_API_URL=
PUBLIC_FRONTEND_URL=
PUBLIC_SITES_URL=

16
Dockerfile Normal file
View 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" ]

View File

@ -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
}