Add docker-compose.dev for local development

This commit is contained in:
2025-11-26 18:57:24 +01:00
parent a0141019b4
commit f0643645b8
3 changed files with 27 additions and 1 deletions
+1
View File
@@ -7,3 +7,4 @@ apocapoc-api
dist/ dist/
bin/ bin/
.internal-notes/ .internal-notes/
docker-compose.dev.yml
+11 -1
View File
@@ -69,8 +69,18 @@ The API will be available at `http://localhost:8080`
- Go 1.23+ - Go 1.23+
- SQLite - SQLite
- Docker (optional)
### Running locally ### Running locally with Docker (Recommended)
```bash
cp docker-compose.dev.example.yml docker-compose.dev.yml
docker-compose -f docker-compose.dev.yml up --build
```
The API will be available at `http://localhost:8080`
### Running locally with Go
```bash ```bash
cp .env.example .env cp .env.example .env
+15
View File
@@ -0,0 +1,15 @@
services:
api:
build: .
ports:
- "8080:8080"
environment:
- DB_PATH=/data/apocapoc.db
- JWT_SECRET=dev-secret-key-change-in-production
- JWT_EXPIRY=24h
- REFRESH_TOKEN_EXPIRY=168h
- CORS_ORIGINS=*
- DEFAULT_TIMEZONE=UTC
volumes:
- ./data:/data
restart: unless-stopped