fix:deploy

This commit is contained in:
2026-03-10 01:46:40 +09:00
parent ce14c4129f
commit e6932648a0
3 changed files with 13 additions and 3 deletions

View File

@@ -4,8 +4,16 @@ set -e
echo "Pulling latest code..." echo "Pulling latest code..."
git pull git pull
echo "Building and restarting containers..." echo "Building frontend..."
docker compose up -d --build docker compose --profile build build frontend-builder
docker compose --profile build run --rm frontend-builder
echo "Copying frontend dist to nginx..."
sudo mkdir -p /var/www/support-ticket-demo
sudo cp -r frontend/dist/. /var/www/support-ticket-demo/
echo "Building and restarting backend..."
docker compose up -d --build backend
echo "Cleaning up old images..." echo "Cleaning up old images..."
docker image prune -f docker image prune -f

View File

@@ -24,7 +24,7 @@ services:
profiles: profiles:
- build - build
volumes: volumes:
- ./frontend/dist:/app/dist - ./frontend/dist:/output
volumes: volumes:
db_data: db_data:

View File

@@ -12,3 +12,5 @@ COPY .env ./
RUN bun install --frozen-lockfile RUN bun install --frozen-lockfile
RUN bun run build RUN bun run build
CMD ["cp", "-r", "/app/dist/.", "/output"]