@omnibase/cli 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/commands/email.d.ts +3 -0
- package/dist/commands/email.d.ts.map +1 -0
- package/dist/commands/email.js +195 -0
- package/dist/commands/email.js.map +1 -0
- package/dist/commands/environment.d.ts +3 -0
- package/dist/commands/environment.d.ts.map +1 -0
- package/dist/commands/environment.js +73 -0
- package/dist/commands/environment.js.map +1 -0
- package/dist/commands/permissions.d.ts +28 -0
- package/dist/commands/permissions.d.ts.map +1 -0
- package/dist/commands/permissions.js +288 -0
- package/dist/commands/permissions.js.map +1 -0
- package/dist/commands/stripe.d.ts +3 -0
- package/dist/commands/stripe.d.ts.map +1 -0
- package/dist/commands/stripe.js +361 -0
- package/dist/commands/stripe.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +163 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/environment.d.ts +41 -0
- package/dist/utils/environment.d.ts.map +1 -0
- package/dist/utils/environment.js +168 -0
- package/dist/utils/environment.js.map +1 -0
- package/docker/db/001-seed.sql +127 -0
- package/docker/db/002-rls.sql +137 -0
- package/docker/db/003-keto.sql +1 -0
- package/docker/db/004-email.sql +110 -0
- package/docker/docker-compose.dev.yml +298 -0
- package/docker/docker-compose.yml +258 -0
- package/package.json +41 -0
- package/templates/.omnibase-config +4 -0
- package/templates/edge/bun.lock +239 -0
- package/templates/edge/dev.ts +13 -0
- package/templates/edge/package.json +22 -0
- package/templates/edge/src/index.ts +26 -0
- package/templates/edge/tsconfig.json +29 -0
- package/templates/edge/wrangler.toml +15 -0
- package/templates/email/tenant-user-invite.html +82 -0
- package/templates/environments/.env.dev +35 -0
- package/templates/environments/.env.prod +13 -0
- package/templates/environments/.env.staging +13 -0
- package/templates/permissions/tenants.ts +34 -0
- package/templates/permissions/types.ts +16 -0
- package/templates/stripe.config.json +20 -0
- package/templates/tsconfig.json +19 -0
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
services:
|
|
2
|
+
# PostgreSQL Database
|
|
3
|
+
postgres:
|
|
4
|
+
image: postgres:17-alpine
|
|
5
|
+
container_name: postgres
|
|
6
|
+
environment:
|
|
7
|
+
POSTGRES_DB: db
|
|
8
|
+
POSTGRES_USER: postgres
|
|
9
|
+
POSTGRES_PASSWORD: postgres
|
|
10
|
+
ports:
|
|
11
|
+
- "5432:5432"
|
|
12
|
+
volumes:
|
|
13
|
+
# - postgres_data:/var/lib/pos/tgresql/data
|
|
14
|
+
- ./db:/docker-entrypoint-initdb.d
|
|
15
|
+
networks:
|
|
16
|
+
- app-network
|
|
17
|
+
restart: unless-stopped
|
|
18
|
+
|
|
19
|
+
kratos-migrate:
|
|
20
|
+
build:
|
|
21
|
+
context: ../../../docker/auth
|
|
22
|
+
dockerfile: Dockerfile
|
|
23
|
+
environment:
|
|
24
|
+
- DSN=postgres://postgres:postgres@postgres:5432/db?sslmode=disable&max_conns=20&max_idle_conns=4&search_path=auth
|
|
25
|
+
- IDENTITY_SCHEMA_URL=http://rest-api:8080/api/v1/auth/identity-schema
|
|
26
|
+
volumes:
|
|
27
|
+
- type: bind
|
|
28
|
+
source: ../../../docker/auth
|
|
29
|
+
target: /etc/config/kratos
|
|
30
|
+
command: migrate sql -e --yes
|
|
31
|
+
restart: on-failure
|
|
32
|
+
networks:
|
|
33
|
+
- app-network
|
|
34
|
+
depends_on:
|
|
35
|
+
- postgres
|
|
36
|
+
- rest-api
|
|
37
|
+
|
|
38
|
+
kratos:
|
|
39
|
+
depends_on:
|
|
40
|
+
- kratos-migrate
|
|
41
|
+
build:
|
|
42
|
+
context: ../../../docker/auth
|
|
43
|
+
dockerfile: Dockerfile
|
|
44
|
+
env_file:
|
|
45
|
+
- ${OMNIBASE_PROJECT_DIR}/omnibase/environments/.env.dev
|
|
46
|
+
ports:
|
|
47
|
+
- "4433:4433" # public
|
|
48
|
+
- "4434:4434" # admin
|
|
49
|
+
restart: unless-stopped
|
|
50
|
+
environment:
|
|
51
|
+
- DSN=postgres://postgres:postgres@postgres:5432/db?sslmode=disable&max_conns=20&max_idle_conns=4&search_path=auth
|
|
52
|
+
- IDENTITY_SCHEMA_URL=http://rest-api:8080/api/v1/auth/identity-schema
|
|
53
|
+
|
|
54
|
+
# Required - will fail if not set
|
|
55
|
+
- WEBSITE_URL=${WEBSITE_URL}
|
|
56
|
+
- COOKIE_SECRET=${COOKIE_SECRET}
|
|
57
|
+
- CIPHER_SECRET=${CIPHER_SECRET}
|
|
58
|
+
- COOKIE_DOMAIN=${COOKIE_DOMAIN:-127.0.0.1}
|
|
59
|
+
|
|
60
|
+
# Optional with defaults
|
|
61
|
+
- LOG_LEVEL=${AUTH_LOG_LEVEL:-info}
|
|
62
|
+
- AUTH_URL=${AUTH_URL:-http://127.0.0.1:4433}
|
|
63
|
+
- AUTH_ADMIN_URL=${AUTH_ADMIN_URL:-http://kratos:4434}
|
|
64
|
+
|
|
65
|
+
- WEBSITE_AUTH_ERROR_URL=${WEBSITE_AUTH_ERROR_URL:-${WEBSITE_URL}/auth/error}
|
|
66
|
+
- WEBSITE_SETTING_URL=${WEBSITE_SETTING_URL:-${WEBSITE_URL}/auth/settings}
|
|
67
|
+
- WEBSITE_RECOVERY_URL=${WEBSITE_RECOVERY_URL:-${WEBSITE_URL}/auth/recovery}
|
|
68
|
+
- WEBSITE_VERIFICATION_RECOVERY_URL=${WEBSITE_VERIFICATION_RECOVERY_URL:-${WEBSITE_URL}/auth/verification}
|
|
69
|
+
- WEBSITE_LOGIN_URL=${WEBSITE_LOGIN_URL:-${WEBSITE_URL}/auth/login}
|
|
70
|
+
- WEBSITE_REGISTRATION_URL=${WEBSITE_REGISTRATION_URL:-${WEBSITE_URL}/auth/registration}
|
|
71
|
+
|
|
72
|
+
- SMTP_CONNECTION_URI=${SMTP_CONNECTION_URI:-smtp://mailpit:1025?disable_starttls=true}
|
|
73
|
+
volumes:
|
|
74
|
+
- type: bind
|
|
75
|
+
source: ../../../docker/auth
|
|
76
|
+
target: /etc/config/kratos
|
|
77
|
+
command: serve --dev --watch-courier
|
|
78
|
+
networks:
|
|
79
|
+
- app-network
|
|
80
|
+
|
|
81
|
+
mailpit:
|
|
82
|
+
image: axllent/mailpit:latest
|
|
83
|
+
container_name: mailpit
|
|
84
|
+
ports:
|
|
85
|
+
- "8025:8025" # Web UI
|
|
86
|
+
- "1025:1025" # SMTP server
|
|
87
|
+
environment:
|
|
88
|
+
MP_MAX_MESSAGES: 5000
|
|
89
|
+
MP_SMTP_AUTH_ACCEPT_ANY: 1
|
|
90
|
+
MP_SMTP_AUTH_ALLOW_INSECURE: 1
|
|
91
|
+
networks:
|
|
92
|
+
- app-network
|
|
93
|
+
restart: unless-stopped
|
|
94
|
+
|
|
95
|
+
# MinIO - Object Storage
|
|
96
|
+
minio:
|
|
97
|
+
image: minio/minio:latest
|
|
98
|
+
container_name: minio
|
|
99
|
+
ports:
|
|
100
|
+
- "9000:9000"
|
|
101
|
+
- "9001:9001"
|
|
102
|
+
environment:
|
|
103
|
+
MINIO_ROOT_USER: minioadmin
|
|
104
|
+
MINIO_ROOT_PASSWORD: minioadmin123
|
|
105
|
+
MINIO_API_CORS_ALLOW_ORIGIN: "*"
|
|
106
|
+
volumes:
|
|
107
|
+
- minio_data:/data
|
|
108
|
+
command: server /data --console-address ":9001"
|
|
109
|
+
networks:
|
|
110
|
+
- app-network
|
|
111
|
+
restart: unless-stopped
|
|
112
|
+
# Create MinIO bucket on startup
|
|
113
|
+
minio-init:
|
|
114
|
+
image: minio/mc:latest
|
|
115
|
+
container_name: minio-init
|
|
116
|
+
depends_on:
|
|
117
|
+
- minio
|
|
118
|
+
entrypoint: >
|
|
119
|
+
/bin/sh -c "
|
|
120
|
+
until /usr/bin/mc alias set myminio http://minio:9000 minioadmin minioadmin123; do
|
|
121
|
+
echo 'Waiting for MinIO to be ready...';
|
|
122
|
+
sleep 2;
|
|
123
|
+
done;
|
|
124
|
+
/usr/bin/mc mb myminio/dev --ignore-existing;
|
|
125
|
+
/usr/bin/mc mb myminio/permission-namespaces --ignore-existing;
|
|
126
|
+
echo 'MinIO buckets created successfully';
|
|
127
|
+
"
|
|
128
|
+
networks:
|
|
129
|
+
- app-network
|
|
130
|
+
|
|
131
|
+
# Adminer - Simple Database Management Interface
|
|
132
|
+
adminer:
|
|
133
|
+
image: adminer:latest
|
|
134
|
+
container_name: adminer
|
|
135
|
+
ports:
|
|
136
|
+
- "8081:8080"
|
|
137
|
+
depends_on:
|
|
138
|
+
- postgres
|
|
139
|
+
networks:
|
|
140
|
+
- app-network
|
|
141
|
+
restart: unless-stopped
|
|
142
|
+
|
|
143
|
+
# PostgREST - Auto-generated REST API from PostgreSQL schema
|
|
144
|
+
postgrest:
|
|
145
|
+
image: postgrest/postgrest:v12.2.0
|
|
146
|
+
container_name: postgrest
|
|
147
|
+
ports:
|
|
148
|
+
- "8001:3000"
|
|
149
|
+
environment:
|
|
150
|
+
PGRST_DB_URI: postgres://postgres:postgres@postgres:5432/db
|
|
151
|
+
PGRST_DB_SCHEMAS: public,auth,storage
|
|
152
|
+
PGRST_DB_ANON_ROLE: anon_user
|
|
153
|
+
PGRST_JWT_SECRET: ${JWT_SIGNING_KEY:-your-secret-jwt-signing-key-change-this-in-production}
|
|
154
|
+
PGRST_OPENAPI_SERVER_PROXY_URI: http://localhost:8001
|
|
155
|
+
depends_on:
|
|
156
|
+
- postgres
|
|
157
|
+
networks:
|
|
158
|
+
- app-network
|
|
159
|
+
restart: unless-stopped
|
|
160
|
+
|
|
161
|
+
# REST API Service
|
|
162
|
+
rest-api:
|
|
163
|
+
build:
|
|
164
|
+
context: ../../../apps/api
|
|
165
|
+
dockerfile: Dockerfile
|
|
166
|
+
container_name: restapi
|
|
167
|
+
ports:
|
|
168
|
+
- "8080:8080"
|
|
169
|
+
volumes:
|
|
170
|
+
- ../../../apps/api:/app
|
|
171
|
+
depends_on:
|
|
172
|
+
- postgres
|
|
173
|
+
networks:
|
|
174
|
+
- app-network
|
|
175
|
+
restart: unless-stopped
|
|
176
|
+
environment:
|
|
177
|
+
# Application
|
|
178
|
+
- PORT=8080
|
|
179
|
+
- KRATOS_URL=http://kratos:4433
|
|
180
|
+
- KRATOS_ADMIN_URL=http://kratos:4434
|
|
181
|
+
|
|
182
|
+
# Database
|
|
183
|
+
- DB_HOST=postgres
|
|
184
|
+
- DB_PORT=5432
|
|
185
|
+
- DB_USER=postgres
|
|
186
|
+
- DB_PASSWORD=postgres
|
|
187
|
+
- DB_NAME=db
|
|
188
|
+
|
|
189
|
+
# S3/MinIO Configuration
|
|
190
|
+
- S3_ENDPOINT=http://minio:9000
|
|
191
|
+
- S3_PUBLIC_ENDPOINT=http://127.0.0.1:9000
|
|
192
|
+
- S3_ACCESS_KEY=minioadmin
|
|
193
|
+
- S3_SECRET_KEY=minioadmin123
|
|
194
|
+
- S3_BUCKET_NAME=files
|
|
195
|
+
- S3_REGION=us-east-1
|
|
196
|
+
- S3_USE_SSL=false
|
|
197
|
+
- S3_FORCE_PATH_STYLE=true
|
|
198
|
+
- S3_BUCKET_NAME=dev
|
|
199
|
+
|
|
200
|
+
# Email Configuration
|
|
201
|
+
- SMTP_CONNECTION_URI=smtp://mailpit:1025
|
|
202
|
+
- SMTP_FROM_EMAIL=noreply@yourapp.com
|
|
203
|
+
- FRONTEND_URL=http://localhost:3000
|
|
204
|
+
|
|
205
|
+
# JWT Configuration
|
|
206
|
+
- JWT_SIGNING_KEY=${JWT_SIGNING_KEY:-your-secret-jwt-signing-key-change-this-in-production}
|
|
207
|
+
|
|
208
|
+
# Keto Configuration
|
|
209
|
+
- KETO_READ_URL=http://keto:4466
|
|
210
|
+
- KETO_WRITE_URL=http://keto:4467
|
|
211
|
+
|
|
212
|
+
# PostgREST Configuration
|
|
213
|
+
- POSTGREST_URL=http://postgrest:3000
|
|
214
|
+
|
|
215
|
+
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}
|
|
216
|
+
- STRIPE_PUBLISHABLE_KEY=${STRIPE_PUBLISHABLE_KEY}
|
|
217
|
+
- STRIPE_WEBHOOK_SECRET=${STRIPE_WEBHOOK_SECRET}
|
|
218
|
+
|
|
219
|
+
keto-migrate:
|
|
220
|
+
build:
|
|
221
|
+
context: ../../../docker/permissions
|
|
222
|
+
dockerfile: Dockerfile
|
|
223
|
+
environment:
|
|
224
|
+
- DSN=postgres://postgres:postgres@postgres:5432/db?sslmode=disable&max_conns=20&max_idle_conns=4&search_path=keto
|
|
225
|
+
command: migrate up -c /etc/config/keto/keto.yml --yes
|
|
226
|
+
restart: on-failure
|
|
227
|
+
networks:
|
|
228
|
+
- app-network
|
|
229
|
+
depends_on:
|
|
230
|
+
- postgres
|
|
231
|
+
- rest-api
|
|
232
|
+
|
|
233
|
+
keto:
|
|
234
|
+
depends_on:
|
|
235
|
+
- keto-migrate
|
|
236
|
+
build:
|
|
237
|
+
context: ../../../docker/permissions
|
|
238
|
+
dockerfile: Dockerfile
|
|
239
|
+
ports:
|
|
240
|
+
- "4466:4466" # read API
|
|
241
|
+
- "4467:4467" # write API
|
|
242
|
+
restart: unless-stopped
|
|
243
|
+
environment:
|
|
244
|
+
- DSN=postgres://postgres:postgres@postgres:5432/db?sslmode=disable&max_conns=20&max_idle_conns=4&search_path=keto
|
|
245
|
+
- LOG_LEVEL=debug
|
|
246
|
+
- NAMESPACE_BUCKET=permission-namespaces
|
|
247
|
+
- TENANT_ID=local
|
|
248
|
+
- R2_ENDPOINT=http://minio:9000
|
|
249
|
+
- R2_ACCESS_KEY=minioadmin
|
|
250
|
+
- R2_SECRET_KEY=minioadmin123
|
|
251
|
+
command: serve -c /etc/config/keto/keto.yml
|
|
252
|
+
networks:
|
|
253
|
+
- app-network
|
|
254
|
+
|
|
255
|
+
postgres-type-gen:
|
|
256
|
+
image: supabase/postgres-meta:canary-pr-971
|
|
257
|
+
ports:
|
|
258
|
+
- 8079:8080
|
|
259
|
+
environment:
|
|
260
|
+
- PG_META_DB_HOST=postgres
|
|
261
|
+
- PG_META_DB_NAME=db
|
|
262
|
+
- PG_META_DB_USER=postgres
|
|
263
|
+
- PG_META_DB_PASSWORD=postgres
|
|
264
|
+
- PG_META_DB_PORT=5432
|
|
265
|
+
depends_on:
|
|
266
|
+
- postgres
|
|
267
|
+
networks:
|
|
268
|
+
- app-network
|
|
269
|
+
# Edge Functions (Hono)
|
|
270
|
+
edge:
|
|
271
|
+
image: oven/bun:1
|
|
272
|
+
container_name: edge
|
|
273
|
+
working_dir: /app
|
|
274
|
+
command: ["sh", "-c", "bun install && bun run --watch dev.ts"]
|
|
275
|
+
ports:
|
|
276
|
+
- "8787:8787"
|
|
277
|
+
volumes:
|
|
278
|
+
- ${OMNIBASE_PROJECT_DIR}/omnibase/edge:/app
|
|
279
|
+
env_file:
|
|
280
|
+
- ${OMNIBASE_PROJECT_DIR}/omnibase/environments/.env.dev
|
|
281
|
+
environment:
|
|
282
|
+
- PORT=8787
|
|
283
|
+
- NODE_ENV=development
|
|
284
|
+
networks:
|
|
285
|
+
- app-network
|
|
286
|
+
restart: unless-stopped
|
|
287
|
+
depends_on:
|
|
288
|
+
- rest-api
|
|
289
|
+
|
|
290
|
+
volumes:
|
|
291
|
+
postgres_data:
|
|
292
|
+
driver: local
|
|
293
|
+
minio_data:
|
|
294
|
+
driver: local
|
|
295
|
+
|
|
296
|
+
networks:
|
|
297
|
+
app-network:
|
|
298
|
+
driver: bridge
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
services:
|
|
2
|
+
# PostgreSQL Database
|
|
3
|
+
postgres:
|
|
4
|
+
image: postgres:17-alpine
|
|
5
|
+
container_name: postgres
|
|
6
|
+
environment:
|
|
7
|
+
POSTGRES_DB: db
|
|
8
|
+
POSTGRES_USER: postgres
|
|
9
|
+
POSTGRES_PASSWORD: postgres
|
|
10
|
+
ports:
|
|
11
|
+
- "5432:5432"
|
|
12
|
+
volumes:
|
|
13
|
+
- postgres_data:/var/lib/postgresql/data
|
|
14
|
+
- ./db:/docker-entrypoint-initdb.d
|
|
15
|
+
networks:
|
|
16
|
+
- app-network
|
|
17
|
+
restart: unless-stopped
|
|
18
|
+
|
|
19
|
+
kratos-migrate:
|
|
20
|
+
image: oryd/kratos:v1.2.0
|
|
21
|
+
environment:
|
|
22
|
+
- DSN=postgres://postgres:postgres@postgres:5432/db?sslmode=disable&max_conns=20&max_idle_conns=4&search_path=auth
|
|
23
|
+
- IDENTITY_SCHEMA_URL=http://rest-api:8080/api/v1/auth/identity-schema
|
|
24
|
+
volumes:
|
|
25
|
+
- type: bind
|
|
26
|
+
source: ./kratos
|
|
27
|
+
target: /etc/config/kratos
|
|
28
|
+
entrypoint: ["/bin/sh", "/etc/config/kratos/entrypoint.sh"]
|
|
29
|
+
command: migrate sql -e --yes
|
|
30
|
+
restart: on-failure
|
|
31
|
+
networks:
|
|
32
|
+
- app-network
|
|
33
|
+
|
|
34
|
+
kratos:
|
|
35
|
+
depends_on:
|
|
36
|
+
- kratos-migrate
|
|
37
|
+
image: oryd/kratos:v1.2.0
|
|
38
|
+
ports:
|
|
39
|
+
- "4433:4433" # public
|
|
40
|
+
- "4434:4434" # admin
|
|
41
|
+
restart: unless-stopped
|
|
42
|
+
environment:
|
|
43
|
+
- DSN=postgres://postgres:postgres@postgres:5432/db?sslmode=disable&max_conns=20&max_idle_conns=4&search_path=auth
|
|
44
|
+
- IDENTITY_SCHEMA_URL=http://rest-api:8080/api/v1/auth/identity-schema
|
|
45
|
+
|
|
46
|
+
# Required - will fail if not set
|
|
47
|
+
- WEBSITE_URL=${WEBSITE_URL}
|
|
48
|
+
- COOKIE_SECRET=${COOKIE_SECRET}
|
|
49
|
+
- CIPHER_SECRET=${CIPHER_SECRET}
|
|
50
|
+
|
|
51
|
+
# Optional with defaults
|
|
52
|
+
- LOG_LEVEL=${AUTH_LOG_LEVEL:-warning}
|
|
53
|
+
- AUTH_URL=${AUTH_URL:-http://127.0.0.1:4433}
|
|
54
|
+
- AUTH_ADMIN_URL=${AUTH_ADMIN_URL:-http://kratos:4434}
|
|
55
|
+
- API_URL=${API_URL:-http://rest-api:8080}
|
|
56
|
+
|
|
57
|
+
- WEBSITE_AUTH_RETURN_URL=${WEBSITE_AUTH_RETURN_URL:-${WEBSITE_URL}}
|
|
58
|
+
- WEBSITE_AUTH_ERROR_URL=${WEBSITE_AUTH_ERROR_URL:-${WEBSITE_URL}/auth/error}
|
|
59
|
+
- WEBSITE_SETTING_URL=${WEBSITE_SETTING_URL:-${WEBSITE_URL}/auth/settings}
|
|
60
|
+
- WEBSITE_RECOVERY_URL=${WEBSITE_RECOVERY_URL:-${WEBSITE_URL}/auth/recovery}
|
|
61
|
+
- WEBSITE_VERIFICATION_RECOVERY_URL=${WEBSITE_VERIFICATION_RECOVERY_URL:-${WEBSITE_URL}/auth/verification}
|
|
62
|
+
- WEBSITE_LOGIN_URL=${WEBSITE_LOGIN_URL:-${WEBSITE_URL}/auth/login}
|
|
63
|
+
- WEBSITE_REGISTRATION_URL=${WEBSITE_REGISTRATION_URL:-${WEBSITE_URL}/auth/registration}
|
|
64
|
+
- WEBSITE_ONBOARDING_URL=${WEBSITE_ONBOARDING_URL:-${WEBSITE_URL}/auth/onboarding}
|
|
65
|
+
- WEBSITE_AUTH_CALLBACK=${WEBSITE_AUTH_CALLBACK:-${WEBSITE_URL}/auth/callback?flow=login}
|
|
66
|
+
|
|
67
|
+
- SMTP_CONNECTION_URI=${SMTP_CONNECTION_URI:-smtps://test:test@mailslurper:1025/?skip_ssl_verify=true}
|
|
68
|
+
volumes:
|
|
69
|
+
- type: bind
|
|
70
|
+
source: ./kratos
|
|
71
|
+
target: /etc/config/kratos
|
|
72
|
+
entrypoint: ["/bin/sh", "/etc/config/kratos/entrypoint.sh"]
|
|
73
|
+
command: serve --dev --watch-courier
|
|
74
|
+
networks:
|
|
75
|
+
- app-network
|
|
76
|
+
|
|
77
|
+
mailslurper:
|
|
78
|
+
image: oryd/mailslurper:latest-smtps
|
|
79
|
+
ports:
|
|
80
|
+
- "4436:4436"
|
|
81
|
+
- "4437:4437"
|
|
82
|
+
networks:
|
|
83
|
+
- app-network
|
|
84
|
+
|
|
85
|
+
# MinIO - Object Storage
|
|
86
|
+
minio:
|
|
87
|
+
image: minio/minio:latest
|
|
88
|
+
container_name: minio
|
|
89
|
+
ports:
|
|
90
|
+
- "9000:9000"
|
|
91
|
+
- "9001:9001"
|
|
92
|
+
environment:
|
|
93
|
+
MINIO_ROOT_USER: minioadmin
|
|
94
|
+
MINIO_ROOT_PASSWORD: minioadmin123
|
|
95
|
+
MINIO_API_CORS_ALLOW_ORIGIN: "*"
|
|
96
|
+
volumes:
|
|
97
|
+
- minio_data:/data
|
|
98
|
+
command: server /data --console-address ":9001"
|
|
99
|
+
networks:
|
|
100
|
+
- app-network
|
|
101
|
+
restart: unless-stopped
|
|
102
|
+
|
|
103
|
+
# Adminer - Simple Database Management Interface
|
|
104
|
+
adminer:
|
|
105
|
+
image: adminer:latest
|
|
106
|
+
container_name: adminer
|
|
107
|
+
ports:
|
|
108
|
+
- "8081:8080"
|
|
109
|
+
depends_on:
|
|
110
|
+
- postgres
|
|
111
|
+
networks:
|
|
112
|
+
- app-network
|
|
113
|
+
restart: unless-stopped
|
|
114
|
+
|
|
115
|
+
# PostgREST - Auto-generated REST API from PostgreSQL schema
|
|
116
|
+
postgrest:
|
|
117
|
+
image: postgrest/postgrest:v12.2.0
|
|
118
|
+
container_name: postgrest
|
|
119
|
+
ports:
|
|
120
|
+
- "8001:3000"
|
|
121
|
+
environment:
|
|
122
|
+
PGRST_DB_URI: postgres://postgres:postgres@postgres:5432/db
|
|
123
|
+
PGRST_DB_SCHEMAS: public,auth,storage
|
|
124
|
+
PGRST_DB_ANON_ROLE: anon_user
|
|
125
|
+
PGRST_JWT_SECRET: ${JWT_SIGNING_KEY:-your-secret-jwt-signing-key-change-this-in-production}
|
|
126
|
+
PGRST_OPENAPI_SERVER_PROXY_URI: http://localhost:8001
|
|
127
|
+
depends_on:
|
|
128
|
+
- postgres
|
|
129
|
+
networks:
|
|
130
|
+
- app-network
|
|
131
|
+
restart: unless-stopped
|
|
132
|
+
|
|
133
|
+
# REST API Service
|
|
134
|
+
rest-api:
|
|
135
|
+
image: omnibase/rest-api:latest
|
|
136
|
+
container_name: restapi
|
|
137
|
+
ports:
|
|
138
|
+
- "8080:8080"
|
|
139
|
+
depends_on:
|
|
140
|
+
- postgres
|
|
141
|
+
- kratos
|
|
142
|
+
networks:
|
|
143
|
+
- app-network
|
|
144
|
+
restart: unless-stopped
|
|
145
|
+
environment:
|
|
146
|
+
# Application
|
|
147
|
+
- PORT=8080
|
|
148
|
+
- KRATOS_URL=http://kratos:4433
|
|
149
|
+
- KRATOS_ADMIN_URL=http://kratos:4434
|
|
150
|
+
|
|
151
|
+
# Database
|
|
152
|
+
- DB_HOST=postgres
|
|
153
|
+
- DB_PORT=5432
|
|
154
|
+
- DB_USER=postgres
|
|
155
|
+
- DB_PASSWORD=postgres
|
|
156
|
+
- DB_NAME=db
|
|
157
|
+
|
|
158
|
+
# S3/MinIO Configuration
|
|
159
|
+
- S3_ENDPOINT=http://minio:9000
|
|
160
|
+
- S3_PUBLIC_ENDPOINT=http://localhost:9000
|
|
161
|
+
- S3_ACCESS_KEY=minioadmin
|
|
162
|
+
- S3_SECRET_KEY=minioadmin123
|
|
163
|
+
- S3_BUCKET_NAME=files
|
|
164
|
+
- S3_REGION=us-east-1
|
|
165
|
+
- S3_USE_SSL=false
|
|
166
|
+
- S3_FORCE_PATH_STYLE=true
|
|
167
|
+
|
|
168
|
+
# Email Configuration
|
|
169
|
+
- SMTP_CONNECTION_URI=smtps://test:test@mailslurper:1025/?skip_ssl_verify=true
|
|
170
|
+
- SMTP_FROM_EMAIL=noreply@yourapp.com
|
|
171
|
+
- FRONTEND_URL=http://localhost:3000
|
|
172
|
+
|
|
173
|
+
# JWT Configuration
|
|
174
|
+
- JWT_SIGNING_KEY=${JWT_SIGNING_KEY:-your-secret-jwt-signing-key-change-this-in-production}
|
|
175
|
+
|
|
176
|
+
# Keto Configuration
|
|
177
|
+
- KETO_READ_URL=http://keto:4466
|
|
178
|
+
- KETO_WRITE_URL=http://keto:4467
|
|
179
|
+
|
|
180
|
+
# PostgREST Configuration
|
|
181
|
+
- POSTGREST_URL=http://postgrest:3000
|
|
182
|
+
|
|
183
|
+
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}
|
|
184
|
+
- STRIPE_PUBLISHABLE_KEY=${STRIPE_PUBLISHABLE_KEY}
|
|
185
|
+
- STRIPE_WEBHOOK_SECRET=${STRIPE_WEBHOOK_SECRET}
|
|
186
|
+
|
|
187
|
+
keto-migrate:
|
|
188
|
+
image: oryd/keto:v0.14.0
|
|
189
|
+
environment:
|
|
190
|
+
- DSN=postgres://postgres:postgres@postgres:5432/db?sslmode=disable&max_conns=20&max_idle_conns=4&search_path=keto
|
|
191
|
+
volumes:
|
|
192
|
+
- type: bind
|
|
193
|
+
source: ./keto
|
|
194
|
+
target: /etc/config/keto
|
|
195
|
+
command: migrate up -c /etc/config/keto/keto.yml --yes
|
|
196
|
+
restart: on-failure
|
|
197
|
+
networks:
|
|
198
|
+
- app-network
|
|
199
|
+
depends_on:
|
|
200
|
+
- postgres
|
|
201
|
+
|
|
202
|
+
keto:
|
|
203
|
+
depends_on:
|
|
204
|
+
- keto-migrate
|
|
205
|
+
image: oryd/keto:v0.14.0
|
|
206
|
+
ports:
|
|
207
|
+
- "4466:4466" # read API
|
|
208
|
+
- "4467:4467" # write API
|
|
209
|
+
restart: unless-stopped
|
|
210
|
+
environment:
|
|
211
|
+
- DSN=postgres://postgres:postgres@postgres:5432/db?sslmode=disable&max_conns=20&max_idle_conns=4&search_path=keto
|
|
212
|
+
- LOG_LEVEL=debug
|
|
213
|
+
volumes:
|
|
214
|
+
- type: bind
|
|
215
|
+
source: ./keto
|
|
216
|
+
target: /etc/config/keto
|
|
217
|
+
command: serve -c /etc/config/keto/keto.yml
|
|
218
|
+
networks:
|
|
219
|
+
- app-network
|
|
220
|
+
|
|
221
|
+
postgres-type-gen:
|
|
222
|
+
image: supabase/postgres-meta:canary-pr-971
|
|
223
|
+
ports:
|
|
224
|
+
- 8079:8080
|
|
225
|
+
environment:
|
|
226
|
+
- PG_META_DB_HOST=postgres
|
|
227
|
+
- PG_META_DB_NAME=db
|
|
228
|
+
- PG_META_DB_USER=postgres
|
|
229
|
+
- PG_META_DB_PASSWORD=postgres
|
|
230
|
+
- PG_META_DB_PORT=5432
|
|
231
|
+
depends_on:
|
|
232
|
+
- postgres
|
|
233
|
+
networks:
|
|
234
|
+
- app-network
|
|
235
|
+
# Edge Functions (Hono)
|
|
236
|
+
edge:
|
|
237
|
+
image: omnibase/edge-functions:latest
|
|
238
|
+
container_name: edge
|
|
239
|
+
ports:
|
|
240
|
+
- "8787:8787"
|
|
241
|
+
environment:
|
|
242
|
+
- PORT=8787
|
|
243
|
+
- NODE_ENV=production
|
|
244
|
+
networks:
|
|
245
|
+
- app-network
|
|
246
|
+
restart: unless-stopped
|
|
247
|
+
depends_on:
|
|
248
|
+
- rest-api
|
|
249
|
+
|
|
250
|
+
volumes:
|
|
251
|
+
postgres_data:
|
|
252
|
+
driver: local
|
|
253
|
+
minio_data:
|
|
254
|
+
driver: local
|
|
255
|
+
|
|
256
|
+
networks:
|
|
257
|
+
app-network:
|
|
258
|
+
driver: bridge
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@omnibase/cli",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "OmniBase CLI - Manage Docker Compose services and environment configuration",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"omnibase": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/",
|
|
11
|
+
"templates/",
|
|
12
|
+
"docker/"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"dev": "NODE_ENV=development bun src/index.ts",
|
|
17
|
+
"start": "node dist/index.js",
|
|
18
|
+
"prepare": "npm run build"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"cli",
|
|
22
|
+
"docker",
|
|
23
|
+
"compose",
|
|
24
|
+
"omnibase"
|
|
25
|
+
],
|
|
26
|
+
"author": "Phoenix Solutions Group",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"commander": "^11.1.0",
|
|
30
|
+
"dotenv": "^16.3.1",
|
|
31
|
+
"@ory/client": "^1.14.3",
|
|
32
|
+
"adm-zip": "^0.5.10",
|
|
33
|
+
"form-data": "^4.0.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "^20.10.0",
|
|
37
|
+
"ts-node": "^10.9.2",
|
|
38
|
+
"typescript": "^5.3.3",
|
|
39
|
+
"@types/bun": "latest"
|
|
40
|
+
}
|
|
41
|
+
}
|