mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-04-28 01:01:13 +08:00
- fix shellcheck issues - base on bleeding container to have smaller diff in the deps - clarify docs - pass build args by --build-arg instead of relying on environment - move build context to separate directory to avoid Docker copying all sources, git and possibly other mess as source - update containers versions - update Dockerfile and container startup to match current weblate container
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
version: "3"
|
|
|
|
##########
|
|
# WARNING!
|
|
# This docker-compose file is meant to be used in the development process
|
|
# and WILL perform very poorly in production.
|
|
#
|
|
# For production-ready docker-compose file see:
|
|
# https://github.com/WeblateOrg/docker-compose
|
|
#########
|
|
|
|
services:
|
|
weblate:
|
|
image: weblate-dev:latest
|
|
build:
|
|
context: ./weblate-dev/
|
|
args:
|
|
USER_ID: ${USER_ID}
|
|
GROUP_ID: ${GROUP_ID}
|
|
ports:
|
|
- ${WEBLATE_HOST}:8080
|
|
user: $USER_ID:$GROUP_ID
|
|
userns_mode: host
|
|
volumes:
|
|
# Local data directory
|
|
- $PWD/data:/app/data
|
|
# Override Weblate with local dir
|
|
- $PWD/../weblate:/usr/local/lib/python3.7/dist-packages/weblate
|
|
restart: always
|
|
depends_on:
|
|
- database
|
|
- cache
|
|
environment:
|
|
DJANGO_SETTINGS_MODULE: weblate.settings_docker
|
|
WEBLATE_SITE_DOMAIN: ${WEBLATE_HOST}
|
|
env_file:
|
|
- ./environment
|
|
database:
|
|
image: postgres:12-alpine
|
|
env_file:
|
|
- ./environment
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
- ./postgres-init:/docker-entrypoint-initdb.d
|
|
restart: always
|
|
cache:
|
|
image: redis:6-alpine
|
|
restart: always
|
|
command: ["redis-server", "--appendonly", "yes"]
|
|
volumes:
|
|
- redis-data:/data
|
|
volumes:
|
|
weblate-data: {}
|
|
postgres-data: {}
|
|
redis-data: {}
|