-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
151 lines (145 loc) · 4.28 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
151 lines (145 loc) · 4.28 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
services:
neo4j-server:
image: neo4j:${NEO4J_DOCKER_VERSION}
container_name: ${NEO4J_DOCKER_NAME}
ports:
- "7474:7474"
- "7687:7687"
volumes:
- ${NEO4J_DOCKER_DATA}:/data
- ${NEO4J_DOCKER_IMPORT}:/import
- ${NEO4J_DOCKER_LOGS}:/logs
environment:
NEO4J_apoc_export_file_enabled: "true"
NEO4J_apoc_import_file_enabled: "true"
NEO4J_server_config_strict__validation_enabled: "false"
NEO4J_server_memory_heap_max__size: "2g"
NEO4J_server_memory_heap_initial__size: "2g"
NEO4J_server_memory_pagecache_size: "2g"
NEO4J_AUTH: "${NEO4J_DOCKER_USER}/${NEO4J_DOCKER_PASSWORD}"
NEO4J_PLUGINS: '["apoc"]'
deploy:
resources:
limits:
cpus: '1.0'
redis:
image: redis:latest
container_name: redis-server
ports:
- "6379:6379"
volumes:
- redis-data:/data
environment:
REDIS_PASSWORD: yourpassword
command: ["redis-server", "--appendonly", "yes"]
deploy:
resources:
limits:
cpus: '0.5'
restart: unless-stopped
client:
image: 'clarknoah/iam-client:latest'
environment:
VITE_GRAPHQL_ENDPOINT: http://localhost:3331/graphql
VITE_LOCAL_NETWORK_GRAPHQL_ENDPOINT: http://localhost:3331/graphql
# Example: Add Redis connection environment variables if needed
åREDIS_HOST: redis-server
REDIS_PORT: 6379
build:
context: '.'
dockerfile: client/Dockerfile.dev
ports:
- '3330:3330'
depends_on:
- web-server
- redis
volumes:
- ./client:/app/client
- /app/client/node_modules
web-server:
restart: always
image: 'clarknoah/iam-server:latest'
build:
context: .
dockerfile: server/Dockerfile
ports:
- '3331:3331'
volumes:
- .:/app
- /app/node_modules
environment:
- NODE_ENV=${NODE_ENV}
- DB_URI=bolt://neo4j-server:7687
# Example: Add Redis connection environment variables if needed
# REDIS_HOST: redis-server
# REDIS_PORT: 6379
depends_on:
- neo4j-server
- redis
# BullMQ worker — same server image, different command. Runs platform-stats
# off-process and refreshes the Redis cache hourly. Reaches Redis by service
# name (shared iam_default network) and Neo4j via the host-published port
# (neo4j runs as a separate container, not in this compose project).
worker:
restart: unless-stopped
image: 'clarknoah/iam-server:latest'
build:
context: .
dockerfile: server/Dockerfile
command: ["yarn", "dev:queue:worker:small"]
volumes:
- .:/app
- /app/node_modules
environment:
- NODE_ENV=${NODE_ENV}
- DB_URI=bolt://host.docker.internal:7687
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=yourpassword
- REDIS_ENABLED=true
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- redis
# Local S3-compatible object storage (replaces the AWS S3 bucket for dev).
# The objectStore provider points here via AWS_S3_ENDPOINT=http://localhost:9000.
# Mirrors the prod plan (Hetzner Object Storage) — same S3 API, different host.
minio:
image: minio/minio:latest
container_name: minio
ports:
- "9000:9000" # S3 API
- "9001:9001" # web console
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
# Allow the browser (Vite client) to PUT directly to presigned URLs.
MINIO_API_CORS_ALLOW_ORIGIN: "http://localhost:3330"
volumes:
- minio-data:/data
command: server /data --console-address ":9001"
restart: unless-stopped
# One-shot: create the dev bucket on boot, then exit.
minio-init:
image: minio/mc:latest
depends_on:
- minio
entrypoint: >
/bin/sh -c "
until (/usr/bin/mc alias set local http://minio:9000 minioadmin minioadmin) do echo 'waiting for minio...'; sleep 1; done;
/usr/bin/mc mb --ignore-existing local/iam-local;
echo 'bucket iam-local ready';
exit 0;
"
volumes:
redis-data:
driver: local
minio-data:
driver: local
# Retain existing volume definitions if any
# ${NEO4J_DOCKER_DATA}:
# external: true
# ${NEO4J_DOCKER_IMPORT}:
# external: true
# ${NEO4J_DOCKER_LOGS}:
# external: true