Add production Dockerfile for backend deployment
This commit is contained in:
23
README.md
23
README.md
@@ -12,6 +12,29 @@ psql "$DATABASE_URL" -f scripts/init_schema.sql
|
||||
./scripts/start_dev.sh
|
||||
```
|
||||
|
||||
## Docker (VPS / Production)
|
||||
|
||||
Build image:
|
||||
```bash
|
||||
cd backend
|
||||
docker build -t memberapi-backend:latest .
|
||||
```
|
||||
|
||||
Run container:
|
||||
```bash
|
||||
docker run -d \
|
||||
--name memberapi-backend \
|
||||
--restart unless-stopped \
|
||||
-p 127.0.0.1:8000:8000 \
|
||||
--env-file .env \
|
||||
memberapi-backend:latest
|
||||
```
|
||||
|
||||
Health check:
|
||||
```bash
|
||||
curl http://127.0.0.1:8000/healthz
|
||||
```
|
||||
|
||||
## Keycloak env
|
||||
|
||||
- Required:
|
||||
|
||||
Reference in New Issue
Block a user