-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
97 lines (92 loc) · 2.18 KB
/
Copy pathdocker-compose.yml
File metadata and controls
97 lines (92 loc) · 2.18 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
# Squache - Intelligent Caching Proxy for Web Scraping
# Standalone Docker Compose for self-hosting
#
# Quick Start:
# 1. Copy the example config: cp example.env .env
# 2. Edit .env with your settings (optional)
# 3. Start: docker compose up -d
#
# Dashboard: http://localhost:3011
# Proxy: http://localhost:3128
#
# On first run, check logs for admin password:
# docker compose logs backend | grep -A5 "SQUACHE ADMIN"
services:
# PostgreSQL database
postgres:
image: postgres:15-alpine
env_file:
- .env
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U squache"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
# Squid Caching Proxy with SSL Bumping
# SSL certificates are auto-generated on first run
proxy:
build:
context: ./proxy
dockerfile: Dockerfile
ports:
- "3128:3128"
volumes:
- ssl_certs:/etc/squid/ssl
- cache_data:/var/spool/squid
- logs:/var/log/squid
- config:/etc/squid/conf.d
healthcheck:
test: ["CMD", "squidclient", "-h", "localhost", "mgr:info"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
# Backend API Server
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: prod
env_file:
- .env
environment:
- PORT=3010
ports:
- "3010:3010"
volumes:
- logs:/var/log/squid:ro
- config:/etc/squid/conf.d
- ssl_certs:/etc/squid/ssl:ro
depends_on:
postgres:
condition: service_healthy
proxy:
condition: service_started
restart: unless-stopped
# Frontend Dashboard
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: runner
args:
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:3010}
NEXT_PUBLIC_SITE_URL: ${NEXT_PUBLIC_SITE_URL:-http://localhost:3011}
env_file:
- .env
environment:
- PORT=3011
ports:
- "3011:3011"
depends_on:
- backend
restart: unless-stopped
volumes:
postgres_data:
ssl_certs:
cache_data:
logs:
config: