-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
148 lines (140 loc) · 4.31 KB
/
docker-compose.yml
File metadata and controls
148 lines (140 loc) · 4.31 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
services:
caddy:
image: caddy:2-alpine
container_name: vintrack_caddy
ports:
- "80:80"
- "443:443"
- "443:443/udp"
dns:
- 1.1.1.1
- 8.8.8.8
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
depends_on:
- control-center
restart: unless-stopped
postgres:
image: postgres:15-alpine
container_name: vintrack_db
environment:
POSTGRES_USER: vinuser
POSTGRES_PASSWORD: vinpassword
POSTGRES_DB: vintrack
ports:
- "127.0.0.1:5435:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U vinuser -d vintrack"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: vintrack_redis
ports:
- "127.0.0.1:6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru --stop-writes-on-bgsave-error no
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
control-center:
build:
context: ./apps/control-center
dockerfile: Dockerfile
image: ghcr.io/jakobaiodev/vintrack-vinted-monitor/control-center:latest
container_name: vintrack_control_center
environment:
- DATABASE_URL=postgresql://vinuser:vinpassword@postgres:5432/vintrack
- REDIS_URL=redis://redis:6379
- AUTH_SECRET=${AUTH_SECRET}
- AUTH_DISCORD_ID=${AUTH_DISCORD_ID}
- AUTH_DISCORD_SECRET=${AUTH_DISCORD_SECRET}
- AUTH_TRUST_HOST=true
- AUTH_URL=${AUTH_URL:-http://localhost:3000}
- DASHBOARD_URL=${DASHBOARD_URL:-http://localhost:3000}
- VINTED_SERVICE_URL=http://vinted-service:4000
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN:-}
- TELEGRAM_BOT_USERNAME=${TELEGRAM_BOT_USERNAME:-}
- TELEGRAM_WEBHOOK_SECRET=${TELEGRAM_WEBHOOK_SECRET:-}
ports:
- "127.0.0.1:3000:3000"
depends_on:
postgres:
condition: service_healthy
control-center-migrate:
condition: service_completed_successfully
restart: unless-stopped
control-center-migrate:
build:
context: ./apps/control-center
dockerfile: Dockerfile
image: ghcr.io/jakobaiodev/vintrack-vinted-monitor/control-center:latest
container_name: vintrack_migrate
command: ["sh", "-c", "npx prisma migrate deploy"]
environment:
- DATABASE_URL=postgresql://vinuser:vinpassword@postgres:5432/vintrack
depends_on:
postgres:
condition: service_healthy
restart: "no"
vinted-service:
build:
context: ./apps/vinted-service
dockerfile: Dockerfile
image: ghcr.io/jakobaiodev/vintrack-vinted-monitor/vinted-service:latest
container_name: vintrack_vinted
environment:
- REDIS_ADDR=redis:6379
- REDIS_PASSWORD=
- DATABASE_URL=postgres://vinuser:vinpassword@postgres:5432/vintrack?sslmode=disable
- VINTED_SESSION_ENCRYPTION_KEY=${VINTED_SESSION_ENCRYPTION_KEY}
- LISTEN_ADDR=:4000
ports:
- "127.0.0.1:4000:4000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
control-center-migrate:
condition: service_completed_successfully
restart: unless-stopped
worker:
build:
context: ./apps/worker
dockerfile: Dockerfile
image: ghcr.io/jakobaiodev/vintrack-vinted-monitor/worker:latest
container_name: vintrack_worker
environment:
- DATABASE_URL=postgres://vinuser:vinpassword@postgres:5432/vintrack?sslmode=disable
- REDIS_ADDR=redis:6379
- REDIS_PASSWORD=
- PROXY_FILE=/app/proxies.txt
- ENRICH_SELLER_INFO=${ENRICH_SELLER_INFO:-true}
- CLIENT_POOL_SIZE=${CLIENT_POOL_SIZE:-5}
- RACE_FETCHERS=${RACE_FETCHERS:-2}
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN:-}
- DASHBOARD_URL=${DASHBOARD_URL:-http://localhost:3000}
volumes:
- ./apps/worker/proxies.txt:/app/proxies.txt
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
control-center-migrate:
condition: service_completed_successfully
restart: unless-stopped
volumes:
postgres_data:
redis_data:
caddy_data:
caddy_config: