rework/lightweight #12

Merged
GauthierWebDev merged 106 commits from rework/lightweight into main 2025-04-21 16:27:38 +00:00
7 changed files with 34 additions and 48 deletions
Showing only changes of commit 15a6ec7b9b - Show all commits

View File

@ -1,3 +1,2 @@
PORT=5500
HMR_PORT=5501
NODE_ENV=development
HMR_PORT=5501

15
Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM oven/bun:alpine
WORKDIR /app
COPY ./app/package.json ./app/bun.lock ./
RUN bun install --frozen-lockfile
COPY ./app /app
RUN bun run build
EXPOSE 3000
CMD [ "pnpm", "preview" ]

0
buildForProduction.sh Normal file
View File

15
compose.prod.yml Normal file
View File

@ -0,0 +1,15 @@
services:
memento:
container_name: memento-prod
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
environment:
- NODE_ENV=development
ports:
- "${PORT}:${PORT}"
- "${HMR_PORT}:${HMR_PORT}"
working_dir: /app
command: bun run preview

View File

@ -1,9 +1,11 @@
services:
dev:
memento:
container_name: memento-dev
image: oven/bun:alpine
env_file:
- .env
environment:
- NODE_ENV=development
ports:
- "${PORT}:${PORT}"
- "${HMR_PORT}:${HMR_PORT}"
@ -11,16 +13,3 @@ services:
- ./app:/app
working_dir: /app
command: bun run dev
prod:
container_name: memento-prod
image: oven/bun:alpine
env_file:
- .env
ports:
- "${PORT}:${PORT}"
- "${HMR_PORT}:${HMR_PORT}"
volumes:
- ./app:/app
working_dir: /app
command: bun run production

View File

@ -1,15 +0,0 @@
FROM node:22-alpine
WORKDIR /app
# COPY ./app/package.json ./app/pnpm-lock.yaml /app/
RUN mkdir -p /app
RUN npm install -g pnpm
RUN chmod -R 775 /app
EXPOSE 3000
ENTRYPOINT [ "pnpm" ]
CMD [ "pnpm", "dev" ]

View File

@ -1,17 +0,0 @@
FROM node:22-alpine
WORKDIR /app
RUN npm install -g pnpm
COPY ./app/package.json ./app/pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --prod false
COPY ./app /app
RUN pnpm build
EXPOSE 3000
CMD [ "pnpm", "preview" ]