mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 04:22:28 +02:00
feat: update docker-compose to use local image and add local compose file
- Update docker-compose.yml to use pre-built komga-local:1.24.3 image - Add docker-compose.local.yml for building from source with Dockerfile.simple-local - Provide both options: using pre-built image or building from local JAR
This commit is contained in:
parent
d430c99f43
commit
2938c9471e
2 changed files with 57 additions and 5 deletions
50
docker-compose.local.yml
Normal file
50
docker-compose.local.yml
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
container_name: komga-postgres
|
||||
environment:
|
||||
POSTGRES_DB: komga
|
||||
POSTGRES_USER: komga
|
||||
POSTGRES_PASSWORD: komga123
|
||||
ports:
|
||||
- "5433:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U komga"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
komga:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.simple-local
|
||||
container_name: komga-backend
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
SPRING_PROFILES_ACTIVE: docker
|
||||
KOMGA_DATABASE_TYPE: postgresql
|
||||
KOMGA_DATABASE_URL: jdbc:postgresql://postgres:5432/komga?connectTimeout=30000&socketTimeout=60000
|
||||
KOMGA_DATABASE_USERNAME: komga
|
||||
KOMGA_DATABASE_PASSWORD: komga123
|
||||
KOMGA_CONFIG_DIR: /config
|
||||
SPRING_DATASOURCE_HIKARI_MAXIMUM_POOL_SIZE: 5
|
||||
SPRING_DATASOURCE_HIKARI_CONNECTION_TIMEOUT: 60000
|
||||
SPRING_DATASOURCE_HIKARI_VALIDATION_TIMEOUT: 5000
|
||||
SPRING_FLYWAY_ENABLED: "false"
|
||||
ports:
|
||||
- "25600:25600"
|
||||
volumes:
|
||||
- komga_config:/config
|
||||
- ./data:/data:ro
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
komga_config:
|
||||
|
|
@ -2,7 +2,7 @@ version: '3.8'
|
|||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
image: postgres:15-alpine
|
||||
container_name: komga-postgres
|
||||
environment:
|
||||
POSTGRES_DB: komga
|
||||
|
|
@ -20,9 +20,7 @@ services:
|
|||
retries: 5
|
||||
|
||||
komga:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile
|
||||
image: komga-local:1.24.3
|
||||
container_name: komga-backend
|
||||
depends_on:
|
||||
postgres:
|
||||
|
|
@ -30,10 +28,14 @@ services:
|
|||
environment:
|
||||
SPRING_PROFILES_ACTIVE: docker
|
||||
KOMGA_DATABASE_TYPE: postgresql
|
||||
KOMGA_DATABASE_URL: jdbc:postgresql://postgres:5432/komga
|
||||
KOMGA_DATABASE_URL: jdbc:postgresql://postgres:5432/komga?connectTimeout=30000&socketTimeout=60000
|
||||
KOMGA_DATABASE_USERNAME: komga
|
||||
KOMGA_DATABASE_PASSWORD: komga123
|
||||
KOMGA_CONFIG_DIR: /config
|
||||
SPRING_DATASOURCE_HIKARI_MAXIMUM_POOL_SIZE: 5
|
||||
SPRING_DATASOURCE_HIKARI_CONNECTION_TIMEOUT: 60000
|
||||
SPRING_DATASOURCE_HIKARI_VALIDATION_TIMEOUT: 5000
|
||||
SPRING_FLYWAY_ENABLED: "false"
|
||||
ports:
|
||||
- "25600:25600"
|
||||
volumes:
|
||||
|
|
|
|||
Loading…
Reference in a new issue