shiori/docker-compose.yaml
Felipe Martin 45bd4d693f
feat: fixes to webroot feature and improvements to development using it (#1046)
* feat: Add nginx service to test shiori webroot configuration

chore: Update nginx configuration to resolve 502 gateway error

fix: Update SHIORI_WEBROOT to SHIORI_HTTP_ROOT_PATH in docker-compose

feat: Add debug log level flag to shiori service

refactor: Update docker-compose with simplified command and log configuration

fix: Change nginx port mapping from 80 to 8081

feat: Add volume for Go module cache in docker-compose

style: Add type attribute to script tags in index.html

feat: Update import statements to use RootPath variable in index.html

* docs: Update contribution guide with server and docker instructions

* docs: Add Docker and nginx documentation for local development

* test: IsValid()
2025-01-01 16:22:30 +01:00

57 lines
1.2 KiB
YAML

# Docker compose for development purposes only.
# Edit it to fit your current development needs.
services:
shiori:
build:
context: .
dockerfile: Dockerfile.compose
container_name: shiori
command:
- "server"
- "--log-level"
- "debug"
ports:
- "8080:8080"
volumes:
- "./dev-data:/srv/shiori"
- ".:/src/shiori"
- "go-mod-cache:/go/pkg/mod"
restart: unless-stopped
links:
- "postgres"
- "mariadb"
environment:
SHIORI_DIR: /srv/shiori
# SHIORI_HTTP_ROOT_PATH: /shiori/
# SHIORI_DATABASE_URL: mysql://shiori:shiori@(mariadb)/shiori?charset=utf8mb4
# SHIORI_DATABASE_URL: postgres://shiori:shiori@postgres/shiori?sslmode=disable
nginx:
image: nginx:alpine
ports:
- "8081:8081"
volumes:
- "./testdata/nginx.conf:/etc/nginx/nginx.conf:ro"
depends_on:
- shiori
postgres:
image: postgres:15
environment:
POSTGRES_PASSWORD: shiori
POSTGRES_USER: shiori
ports:
- "5432:5432"
mariadb:
image: mariadb:11
environment:
MYSQL_ROOT_PASSWORD: toor
MYSQL_DATABASE: shiori
MYSQL_USER: shiori
MYSQL_PASSWORD: shiori
ports:
- "3306:3306"
volumes:
go-mod-cache: