-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.ci.yml
More file actions
62 lines (58 loc) · 1.77 KB
/
Copy pathdocker-compose.ci.yml
File metadata and controls
62 lines (58 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# SPDX-FileCopyrightText: 2026 Andrew Zhang <whisper67265@outlook.com>
#
# SPDX-License-Identifier: BSL-1.0
# CI / plugin tests: bundled PostgreSQL + Redis + Weblate (ephemeral Postgres).
# CI: docker compose -f docker/docker-compose.ci.yml build && docker compose -f docker/docker-compose.ci.yml up -d
# CD: docker compose -f docker/docker-compose.cd.yml --env-file .env up -d
services:
postgresql:
image: postgres:16-alpine
environment:
POSTGRES_USER: weblate
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-weblate}
POSTGRES_DB: weblate
healthcheck:
test: [CMD, pg_isready, -U, weblate]
interval: 5s
timeout: 3s
retries: 10
tmpfs:
- /var/lib/postgresql/data
redis:
image: redis:7-alpine
healthcheck:
test: [CMD, redis-cli, ping]
interval: 5s
timeout: 3s
retries: 10
weblate:
build:
context: ..
dockerfile: docker/Dockerfile.weblate-plugin
ports:
- ${WEBLATE_PORT:-8080}:8080
depends_on:
postgresql:
condition: service_healthy
redis:
condition: service_healthy
environment:
WEBLATE_SITE_DOMAIN: ${WEBLATE_SITE_DOMAIN:-localhost:8080}
WEBLATE_ADMIN_PASSWORD: ${WEBLATE_ADMIN_PASSWORD:-admin}
WEBLATE_DEBUG: ${WEBLATE_DEBUG:-1}
POSTGRES_HOST: postgresql
POSTGRES_PORT: '5432'
POSTGRES_USER: weblate
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-weblate}
POSTGRES_DATABASE: weblate
REDIS_HOST: redis
REDIS_PORT: '6379'
CELERY_SINGLE_PROCESS: '1'
BOOST_ENDPOINT_THROTTLE_INFO: 3/minute
BOOST_ENDPOINT_THROTTLE_ADD_OR_UPDATE: 3/hour
healthcheck:
test: [CMD, curl, -f, http://localhost:8080/healthz/]
interval: 10s
timeout: 5s
retries: 12
start_period: 60s