-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
27 lines (21 loc) · 704 Bytes
/
Copy pathdeploy.sh
File metadata and controls
27 lines (21 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# Deploy script for deutschMachine on Contabo VPS
set -e
echo "=== deutschMachine Deploy ==="
# Build and start
docker compose -f docker-compose.prod.yml up -d --build
# Wait for DB
echo "Waiting for database..."
sleep 5
# Run migrations
docker exec deutschmachine-web python manage.py migrate --noinput
# Seed data (only first time)
if [ "$1" = "--seed" ]; then
echo "Seeding vocabulary..."
docker exec deutschmachine-web python manage.py seed_content
echo "Seeding lessons..."
docker exec deutschmachine-web python manage.py seed_lessons
fi
echo "=== Deploy complete ==="
echo "App running at https://learn.fincaradar.com"
docker compose -f docker-compose.prod.yml ps