fix: guest hiển thị lời mời này không tồn tại
This commit is contained in:
+20
-27
@@ -1,17 +1,14 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
container_name: yotrip-db
|
||||
container_name: yotrip-db-prod
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: travel_db
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- pg_data:/var/lib/postgresql/data
|
||||
- pg_data_prod:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres -d travel_db"]
|
||||
interval: 5s
|
||||
@@ -20,30 +17,29 @@ services:
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: yotrip-redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
container_name: yotrip-redis-prod
|
||||
restart: always
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
target: development
|
||||
container_name: yotrip-backend
|
||||
target: production
|
||||
container_name: yotrip-backend-prod
|
||||
restart: always
|
||||
command: >
|
||||
sh -c "npx prisma migrate dev --schema=prisma/schema.prisma && npm run start:dev"
|
||||
sh -c "npx prisma migrate deploy --schema=prisma/schema.prisma && node dist/src/main.js"
|
||||
ports:
|
||||
- "3001:3001"
|
||||
volumes:
|
||||
- ./backend:/usr/src/app
|
||||
- /usr/src/app/node_modules
|
||||
- ./backend/uploads:/usr/src/app/uploads
|
||||
environment:
|
||||
DATABASE_URL: "postgresql://postgres:password@postgres:5432/travel_db?schema=public"
|
||||
REDIS_URL: "redis://redis:6379"
|
||||
PORT: 3001
|
||||
ADMIN_SECRET_KEY: "yotrip_secret_admin_key"
|
||||
ADMIN_SECRET_KEY: "${ADMIN_SECRET_KEY}"
|
||||
JWT_SECRET: "super-secret"
|
||||
FRONTEND_URL: "http://localhost:5173"
|
||||
NODE_ENV: development
|
||||
FRONTEND_URL: "${FRONTEND_URL}"
|
||||
NODE_ENV: production
|
||||
SMTP_HOST: "${SMTP_HOST}"
|
||||
SMTP_PORT: "${SMTP_PORT}"
|
||||
SMTP_SECURE: "${SMTP_SECURE}"
|
||||
@@ -58,18 +54,15 @@ services:
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
target: development
|
||||
container_name: yotrip-frontend
|
||||
command: npm run dev -- --host 0.0.0.0
|
||||
target: production
|
||||
args:
|
||||
- VITE_GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
|
||||
container_name: yotrip-frontend-prod
|
||||
restart: always
|
||||
ports:
|
||||
- "5173:5173"
|
||||
volumes:
|
||||
- ./frontend:/usr/src/app
|
||||
- /usr/src/app/node_modules
|
||||
environment:
|
||||
VITE_API_URL: "http://localhost:3001"
|
||||
- "3002:80"
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
volumes:
|
||||
pg_data:
|
||||
pg_data_prod:
|
||||
|
||||
Reference in New Issue
Block a user