Compare commits
2 Commits
3d2056c3d9
...
14f308f33e
| Author | SHA1 | Date | |
|---|---|---|---|
| 14f308f33e | |||
| 15a6ec7b9b |
@ -1,3 +1,2 @@
|
||||
PORT=5500
|
||||
HMR_PORT=5501
|
||||
NODE_ENV=development
|
||||
@ -41,7 +41,7 @@ jobs:
|
||||
VPS_PATH: ${{ secrets.VPS_PATH }}
|
||||
VPS_PORT: ${{ secrets.VPS_PORT }}
|
||||
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."
|
||||
|
||||
- name: Start the application
|
||||
@ -51,5 +51,5 @@ jobs:
|
||||
VPS_PATH: ${{ secrets.VPS_PATH }}
|
||||
VPS_PORT: ${{ secrets.VPS_PORT }}
|
||||
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."
|
||||
|
||||
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:
|
||||
memento-prod:
|
||||
memento:
|
||||
container_name: memento-prod
|
||||
build:
|
||||
context: .
|
||||
dockerfile: production.Dockerfile
|
||||
dockerfile: Dockerfile
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
ports:
|
||||
- "${PORT}:${PORT}"
|
||||
restart: unless-stopped
|
||||
17
compose.yml
17
compose.yml
@ -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
|
||||
|
||||
@ -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