Compare commits
2 Commits
d8b52cf907
...
3dc0171639
| Author | SHA1 | Date | |
|---|---|---|---|
| 3dc0171639 | |||
| 312b14e57b |
@@ -13,3 +13,4 @@ alembic/
|
|||||||
__pycache__
|
__pycache__
|
||||||
*.pyc
|
*.pyc
|
||||||
docker-compose.yaml
|
docker-compose.yaml
|
||||||
|
docker-compose.dev.yaml
|
||||||
|
|||||||
12
.env.production
Normal file
12
.env.production
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# SneakySwole Production Environment
|
||||||
|
# Copy to .env on your production server and fill in real values.
|
||||||
|
|
||||||
|
ADMIN_USERNAME=admin
|
||||||
|
ADMIN_PASSWORD=
|
||||||
|
|
||||||
|
APP_ENV=production
|
||||||
|
APP_HOST=0.0.0.0
|
||||||
|
APP_PORT=8000
|
||||||
|
APP_LOG_LEVEL=warning
|
||||||
|
|
||||||
|
DATABASE_URL=sqlite:///data/sneakyswole.db
|
||||||
29
docker-compose.dev.yaml
Normal file
29
docker-compose.dev.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: sneakyswole-dev
|
||||||
|
ports:
|
||||||
|
- "${APP_PORT:-8000}:8000"
|
||||||
|
volumes:
|
||||||
|
- sneakyswole-data:/app/data
|
||||||
|
- ./app:/app/app
|
||||||
|
- ./config:/app/config
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- APP_ENV=development
|
||||||
|
- APP_LOG_LEVEL=debug
|
||||||
|
command: ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 10s
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
sneakyswole-data:
|
||||||
|
driver: local
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build:
|
image: git.sneakygeek.net/sneakygeek/sneakyswole:latest
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
container_name: sneakyswole
|
container_name: sneakyswole
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "${APP_PORT:-8000}:8000"
|
||||||
volumes:
|
volumes:
|
||||||
- sneakyswole-data:/app/data
|
- sneakyswole-data:/app/data
|
||||||
env_file:
|
env_file:
|
||||||
|
|||||||
2
run_dev_docker.sh
Executable file
2
run_dev_docker.sh
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
docker compose -f docker-compose.dev.yaml up --build "$@"
|
||||||
Reference in New Issue
Block a user