fix:deploy
This commit is contained in:
12
deploy.sh
12
deploy.sh
@@ -4,8 +4,16 @@ set -e
|
||||
echo "Pulling latest code..."
|
||||
git pull
|
||||
|
||||
echo "Building and restarting containers..."
|
||||
docker compose up -d --build
|
||||
echo "Building frontend..."
|
||||
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..."
|
||||
docker image prune -f
|
||||
|
||||
@@ -24,7 +24,7 @@ services:
|
||||
profiles:
|
||||
- build
|
||||
volumes:
|
||||
- ./frontend/dist:/app/dist
|
||||
- ./frontend/dist:/output
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
|
||||
@@ -12,3 +12,5 @@ COPY .env ./
|
||||
|
||||
RUN bun install --frozen-lockfile
|
||||
RUN bun run build
|
||||
|
||||
CMD ["cp", "-r", "/app/dist/.", "/output"]
|
||||
|
||||
Reference in New Issue
Block a user