Compare commits
2 Commits
3d2056c3d9
...
14f308f33e
| Author | SHA1 | Date | |
|---|---|---|---|
| 14f308f33e | |||
| 15a6ec7b9b |
@ -1,3 +1,2 @@
|
|||||||
PORT=5500
|
PORT=5500
|
||||||
HMR_PORT=5501
|
HMR_PORT=5501
|
||||||
NODE_ENV=development
|
|
||||||
@ -41,7 +41,7 @@ jobs:
|
|||||||
VPS_PATH: ${{ secrets.VPS_PATH }}
|
VPS_PATH: ${{ secrets.VPS_PATH }}
|
||||||
VPS_PORT: ${{ secrets.VPS_PORT }}
|
VPS_PORT: ${{ secrets.VPS_PORT }}
|
||||||
run: |
|
run: |
|
||||||
ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose -f compose-prod.yml build --no-cache"
|
ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose -f compose.prod.yml build --no-cache"
|
||||||
echo "📦 The application have been builded on the VPS."
|
echo "📦 The application have been builded on the VPS."
|
||||||
|
|
||||||
- name: Start the application
|
- name: Start the application
|
||||||
@ -51,5 +51,5 @@ jobs:
|
|||||||
VPS_PATH: ${{ secrets.VPS_PATH }}
|
VPS_PATH: ${{ secrets.VPS_PATH }}
|
||||||
VPS_PORT: ${{ secrets.VPS_PORT }}
|
VPS_PORT: ${{ secrets.VPS_PORT }}
|
||||||
run: |
|
run: |
|
||||||
ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose -f compose-prod.yml up -d"
|
ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose -f compose.prod.yml up -d"
|
||||||
echo "🚀 The application has been started on the VPS."
|
echo "🚀 The application has been started on the VPS."
|
||||||
|
|||||||
15
Dockerfile
Normal file
15
Dockerfile
Normal 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 [ "bun", "run", "preview" ]
|
||||||
@ -1,14 +0,0 @@
|
|||||||
services:
|
|
||||||
memento-dev:
|
|
||||||
container_name: memento-dev
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: pnpm.Dockerfile
|
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
ports:
|
|
||||||
- "${PORT}:${PORT}"
|
|
||||||
- "${HMR_PORT}:${HMR_PORT}"
|
|
||||||
volumes:
|
|
||||||
- ./app:/app
|
|
||||||
restart: unless-stopped
|
|
||||||
@ -1,11 +1,12 @@
|
|||||||
services:
|
services:
|
||||||
memento-prod:
|
memento:
|
||||||
container_name: memento-prod
|
container_name: memento-prod
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: production.Dockerfile
|
dockerfile: Dockerfile
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
environment:
|
||||||
|
- NODE_ENV=production
|
||||||
ports:
|
ports:
|
||||||
- "${PORT}:${PORT}"
|
- "${PORT}:${PORT}"
|
||||||
restart: unless-stopped
|
|
||||||
17
compose.yml
17
compose.yml
@ -1,9 +1,11 @@
|
|||||||
services:
|
services:
|
||||||
dev:
|
memento:
|
||||||
container_name: memento-dev
|
container_name: memento-dev
|
||||||
image: oven/bun:alpine
|
image: oven/bun:alpine
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
environment:
|
||||||
|
- NODE_ENV=development
|
||||||
ports:
|
ports:
|
||||||
- "${PORT}:${PORT}"
|
- "${PORT}:${PORT}"
|
||||||
- "${HMR_PORT}:${HMR_PORT}"
|
- "${HMR_PORT}:${HMR_PORT}"
|
||||||
@ -11,16 +13,3 @@ services:
|
|||||||
- ./app:/app
|
- ./app:/app
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
command: bun run dev
|
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
|
|
||||||
|
|||||||
@ -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" ]
|
|
||||||
@ -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" ]
|
|
||||||
@ -1 +0,0 @@
|
|||||||
[{"content":"qu-est-ce-que-le-hook-use-reducer","hash":"qu-est-ce-que-le-hook-use-reducer","level":2,"subsections":[{"content":"quand-utiliser-use-reducer","hash":"quand-utiliser-use-reducer","level":3,"subsections":[{"content":"a-quoi-ressemble-un-reducer","hash":"a-quoi-ressemble-un-reducer","level":2,"subsections":[{"content":"comment-utiliser-use-reducer","hash":"comment-utiliser-use-reducer","level":2,"subsections":[{"content":"on-nettoie-tout-ca","hash":"on-nettoie-tout-ca","level":2,"subsections":[{"content":"typage-des-actions","hash":"typage-des-actions","level":3,"subsections":[{"content":"action-creators","hash":"action-creators","level":3,"subsections":[{"content":"les-fichiers-complets","hash":"les-fichiers-complets","level":2,"subsections":[{"content":"fichier-counter-jsx-ou-counter-tsx","hash":"fichier-counter-jsx-ou-counter-tsx","level":3,"subsections":[{"content":"c-est-l-heure-des-questions","hash":"c-est-l-heure-des-questions","level":2,"subsections":[{"content":"conclusion","hash":"conclusion","level":2,"subsections":[]}]}]}]}]}]}]}]}]}]}]}]
|
|
||||||
Loading…
Reference in New Issue
Block a user