-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
100 lines (96 loc) · 2.19 KB
/
Copy pathdocker-compose.yml
File metadata and controls
100 lines (96 loc) · 2.19 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
services:
postgres:
image: postgres:16-alpine3.20
container_name: blob-lens-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_DB: blob_lens
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=en_US.UTF-8"
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d blob_lens"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- blob-lens-network
restart: unless-stopped
cap_drop:
- ALL
cap_add:
- CHOWN
- DAC_OVERRIDE
- SETGID
- SETUID
tmpfs:
- /run
- /tmp
blob-lens:
build:
context: ./apps/api_v1
dockerfile: Dockerfile
args:
RUST_BACKTRACE: 1
container_name: blob-lens-app
depends_on:
postgres:
condition: service_healthy
environment:
ALCHEMY_KEY: ${ALCHEMY_KEY}
DATABASE_URL: ${DATABASE_URL}
RUST_LOG: ${RUST_LOG:-info}
RUST_BACKTRACE: ${RUST_BACKTRACE:-1}
volumes:
- ./.env:/app/.env:ro
ports:
- "0.0.0.0:8080:8080"
networks:
- blob-lens-network
restart: unless-stopped
cap_drop:
- ALL
cap_add:
- NET_BIND_SERVICE
read_only: true
tmpfs:
- /tmp
deploy:
resources:
limits:
cpus: '2'
memory: 512M
reservations:
cpus: '1'
memory: 256M
frontend:
build:
context: ./apps/web
dockerfile: Dockerfile
container_name: blob-lens-frontend
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD:-password}@postgres:5432/blob_lens
NEXT_PUBLIC_APP_URL: http://localhost:3000
NEXT_PUBLIC_MARKET_REFRESH_MS: "12000"
NEXT_PUBLIC_LEADERBOARD_REFRESH_MS: "30000"
ports:
- "3000:3000"
networks:
- blob-lens-network
restart: unless-stopped
volumes:
postgres_data:
driver: local
networks:
blob-lens-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16