1
0
Fork 0
mirror of https://github.com/EDeev/web-dev.git synced 2026-10-08 04:59:37 +03:00
web-dev/docker/entrypoint.sh

7 lines
386 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
# Первый запуск: база с ролями и тестовыми пользователями (пароли — из SEED_*_PASSWORD или случайные, в лог)
set -e
cp -n /opt/db-seed/* /app/db/ 2>/dev/null || true
[ -f /app/db/library.db ] || python db/db_seed.py
mkdir -p /app/app/static/uploads
exec gunicorn --workers 2 --bind 0.0.0.0:8000 app:app