Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
179 lines (170 loc) · 4.67 KB
/
Copy pathdocker-compose.yml
File metadata and controls
179 lines (170 loc) · 4.67 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
services:
db:
restart: "no"
image: postgres:17
environment:
POSTGRES_DB: lcfs
POSTGRES_USER: lcfs
POSTGRES_PASSWORD: development_only
ports:
- "${LCFS_DB_PUBLISHED_PORT:-5432}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- shared_network
redis:
restart: "no"
image: redis:8.2.1
environment:
REDIS_PASSWORD: development_only
command: >
sh -c 'exec redis-server --appendonly yes --requirepass "$$REDIS_PASSWORD"'
healthcheck:
test: ["CMD-SHELL", 'redis-cli -a "$$REDIS_PASSWORD" ping | grep PONG']
interval: 10s
timeout: 3s
retries: 5
ports:
- "${LCFS_REDIS_PUBLISHED_PORT:-6379}:6379"
volumes:
- redis_data:/data
networks:
- shared_network
# clamav:
# image: clamav/clamav:stable_base
# volumes:
# - clamsocket:/var/run/clamav/
# - clamav:/var/lib/clamav
# ports:
# - "3310:3310"
# networks:
# - shared_network
rustfs:
image: rustfs/rustfs:1.0.0
restart: "no"
environment:
RUSTFS_ACCESS_KEY: s3_access_key
RUSTFS_SECRET_KEY: development_only
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:9000/health"]
interval: 5s
timeout: 3s
retries: 12
volumes:
- rustfs_data:/data
ports:
- "${LCFS_RUSTFS_PUBLISHED_PORT:-9000}:9000"
- "${LCFS_RUSTFS_CONSOLE_PUBLISHED_PORT:-9001}:9001"
networks:
- shared_network
# RustFS cannot create buckets on startup, so this one-off job creates the
# lcfs bucket once RustFS is healthy, then exits. curl signs the S3 requests
# itself (--aws-sigv4), so no S3 client image is needed.
create_bucket:
image: curlimages/curl:8.22.0
restart: "no"
entrypoint:
- /bin/sh
- -c
- |
s3() { curl --aws-sigv4 aws:amz:us-east-1:s3 --user s3_access_key:development_only "$$@"; }
if s3 -sf -o /dev/null -I http://rustfs:9000/lcfs; then
echo "Bucket lcfs already exists"
else
s3 -fsS -X PUT http://rustfs:9000/lcfs && echo "Created bucket lcfs"
fi
networks:
- shared_network
depends_on:
rustfs:
condition: service_healthy
backend:
restart: "no"
build:
context: ./backend
dockerfile: 'Dockerfile'
target: dev
volumes:
- type: bind
source: ./backend
target: /app
consistency: cached
environment:
LCFS_DB_HOST: db
LCFS_DB_PORT: 5432
LCFS_DB_USER: lcfs
LCFS_DB_PASS: development_only
LCFS_DB_BASE: lcfs
LCFS_REDIS_HOST: redis
LCFS_REDIS_PORT: 6379
LCFS_REDIS_PASSWORD: development_only
LCFS_S3_ENDPOINT: http://rustfs:9000
LCFS_FRONTEND_PUBLISHED_PORT: "${LCFS_FRONTEND_PUBLISHED_PORT:-3000}"
LCFS_RELOAD: true
APP_ENVIRONMENT: dev
ports:
- "${LCFS_BACKEND_PUBLISHED_PORT:-8000}:8000" # Application port
- "${LCFS_BACKEND_DEBUG_PUBLISHED_PORT:-5678}:5678" # Debugger port
depends_on:
db:
condition: service_started
redis:
condition: service_started
create_bucket:
condition: service_completed_successfully
# clamav:
# condition: service_started
networks:
- shared_network
frontend:
restart: "no"
build:
dockerfile: Dockerfile.dev
context: ./frontend
command: npm run dev --force
environment:
VITE_API_BASE_URL: "http://localhost:${LCFS_BACKEND_PUBLISHED_PORT:-8000}/api"
ports:
- "${LCFS_FRONTEND_PUBLISHED_PORT:-3000}:3000"
volumes:
- type: bind
source: ./frontend
target: /app
- type: volume
source: node_modules
target: /app/node_modules
networks:
- shared_network
# LCFS MCP Server - Development Only
# Model Context Protocol server for local development and testing
# WARNING: This service only runs in development environment
# mcp-server:
# container_name: lcfs-mcp-server
# restart: "no"
# build:
# context: ./mcp-server
# dockerfile: Dockerfile
# environment:
# APP_ENVIRONMENT: dev
# NODE_ENV: development
# volumes:
# - type: bind
# source: ./mcp-server/src
# target: /app/src
# consistency: cached
# networks:
# - shared_network
# # No ports exposed - uses stdio transport
# labels:
# - "lcfs.service=mcp-server"
# - "lcfs.environment=development-only"
# - "lcfs.description=Model Context Protocol server for local development"
volumes:
postgres_data: {}
redis_data: {}
node_modules: {}
rustfs_data: {}
clamav: {}
clamsocket: {}
networks:
shared_network: {}