Compare commits
No commits in common. "14f308f33ebe2c12d71efd168d25f423220f7369" and "3d2056c3d9685f0a86f4d4281e4bcbc392298e30" have entirely different histories.
14f308f33e
...
3d2056c3d9
@ -1,2 +1,3 @@
|
||||
PORT=5500
|
||||
HMR_PORT=5501
|
||||
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
15
Dockerfile
@ -1,15 +0,0 @@
|
||||
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" ]
|
||||
14
compose-old.yml
Normal file
14
compose-old.yml
Normal file
@ -0,0 +1,14 @@
|
||||
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,12 +1,11 @@
|
||||
services:
|
||||
memento:
|
||||
memento-prod:
|
||||
container_name: memento-prod
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: production.Dockerfile
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
ports:
|
||||
- "${PORT}:${PORT}"
|
||||
restart: unless-stopped
|
||||
17
compose.yml
17
compose.yml
@ -1,11 +1,9 @@
|
||||
services:
|
||||
memento:
|
||||
dev:
|
||||
container_name: memento-dev
|
||||
image: oven/bun:alpine
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
ports:
|
||||
- "${PORT}:${PORT}"
|
||||
- "${HMR_PORT}:${HMR_PORT}"
|
||||
@ -13,3 +11,16 @@ 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
|
||||
|
||||
15
pnpm.Dockerfile
Normal file
15
pnpm.Dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
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" ]
|
||||
17
production.Dockerfile
Normal file
17
production.Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
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
temp.json
Normal file
1
temp.json
Normal file
@ -0,0 +1 @@
|
||||
[{"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