-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose-redis.yml
83 lines (76 loc) · 2.28 KB
/
docker-compose-redis.yml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Development deployment using Redis as Broker
version: "3.9"
volumes:
repository-service-tuf-storage:
repository-service-tuf-api-data:
repository-service-tuf-redis-data:
repository-service-tuf-pgsql-data:
services:
postgres:
image: postgres:15.1
ports:
- "5433:5432"
environment:
- POSTGRES_PASSWORD=secret
volumes:
- "repository-service-tuf-pgsql-data:/var/lib/postgresql/data"
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres", "-d", "postgres"]
interval: 1s
repository-service-tuf-api:
image: ghcr.io/repository-service-tuf/repository-service-tuf-api:${API_VERSION}
volumes:
- repository-service-tuf-api-data:/data
ports:
- 80:80
environment:
- RSTUF_BROKER_SERVER=redis://redis
- RSTUF_REDIS_SERVER=redis://redis
depends_on:
redis:
condition: service_healthy
web:
image: python:3.12-slim
command: python -m http.server -d /var/opt/repository-service-tuf/storage 8080
volumes:
- repository-service-tuf-storage:/var/opt/repository-service-tuf/storage
ports:
- "8080:8080"
redis:
image: redis:4.0
volumes:
- repository-service-tuf-redis-data:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
repository-service-tuf-worker:
build:
context: .
entrypoint: "bash entrypoint-dev.sh"
environment:
- DATA_DIR=./data
- RSTUF_STORAGE_BACKEND=LocalStorage
- RSTUF_LOCAL_STORAGE_BACKEND_PATH=/var/opt/repository-service-tuf/storage
- RSTUF_ONLINE_KEY_DIR=/var/opt/repository-service-tuf/key_storage
- RSTUF_BROKER_SERVER=redis://redis
- RSTUF_REDIS_SERVER=redis://redis
- RSTUF_DB_SERVER=postgresql://postgres:secret@postgres:5432
volumes:
- ./:/opt/repository-service-tuf-worker:z
- repository-service-tuf-storage:/var/opt/repository-service-tuf/storage
- ./tests/files/key_storage/:/var/opt/repository-service-tuf/key_storage
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
tty: true
stdin_open: true
rstuf-ft-runner:
image: python:3.12-slim
command: python -V
working_dir: /rstuf-runner
volumes:
- ./:/rstuf-runner