@omnibase/cli 0.0.1 → 0.2.0
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/dist/commands/auth.d.ts +6 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +94 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/cloud.d.ts +10 -0
- package/dist/commands/cloud.d.ts.map +1 -0
- package/dist/commands/cloud.js +435 -0
- package/dist/commands/cloud.js.map +1 -0
- package/dist/commands/db.d.ts +10 -0
- package/dist/commands/db.d.ts.map +1 -0
- package/dist/commands/db.js +399 -0
- package/dist/commands/db.js.map +1 -0
- package/dist/commands/email.d.ts +4 -0
- package/dist/commands/email.d.ts.map +1 -1
- package/dist/commands/email.js +87 -65
- package/dist/commands/email.js.map +1 -1
- package/dist/commands/environment.d.ts.map +1 -1
- package/dist/commands/environment.js +7 -52
- package/dist/commands/environment.js.map +1 -1
- package/dist/commands/migrate.d.ts +6 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +204 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/permissions.d.ts +6 -17
- package/dist/commands/permissions.d.ts.map +1 -1
- package/dist/commands/permissions.js +125 -104
- package/dist/commands/permissions.js.map +1 -1
- package/dist/commands/restart.d.ts +3 -0
- package/dist/commands/restart.d.ts.map +1 -0
- package/dist/commands/restart.js +196 -0
- package/dist/commands/restart.js.map +1 -0
- package/dist/commands/stripe.d.ts +4 -0
- package/dist/commands/stripe.d.ts.map +1 -1
- package/dist/commands/stripe.js +489 -190
- package/dist/commands/stripe.js.map +1 -1
- package/dist/commands/sync.d.ts +3 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +144 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/config/services.d.ts +19 -0
- package/dist/config/services.d.ts.map +1 -0
- package/dist/config/services.js +34 -0
- package/dist/config/services.js.map +1 -0
- package/dist/index.js +50 -55
- package/dist/index.js.map +1 -1
- package/dist/utils/api-client.d.ts +17 -0
- package/dist/utils/api-client.d.ts.map +1 -0
- package/dist/utils/api-client.js +65 -0
- package/dist/utils/api-client.js.map +1 -0
- package/dist/utils/context.d.ts +23 -0
- package/dist/utils/context.d.ts.map +1 -0
- package/dist/utils/context.js +30 -0
- package/dist/utils/context.js.map +1 -0
- package/dist/utils/credentials.d.ts +19 -0
- package/dist/utils/credentials.d.ts.map +1 -0
- package/dist/utils/credentials.js +77 -0
- package/dist/utils/credentials.js.map +1 -0
- package/dist/utils/docker.d.ts +27 -0
- package/dist/utils/docker.d.ts.map +1 -0
- package/dist/utils/docker.js +126 -0
- package/dist/utils/docker.js.map +1 -0
- package/dist/utils/environment.d.ts +14 -4
- package/dist/utils/environment.d.ts.map +1 -1
- package/dist/utils/environment.js +65 -21
- package/dist/utils/environment.js.map +1 -1
- package/dist/utils/errors.d.ts +3 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +30 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +66 -0
- package/dist/utils/logger.js.map +1 -0
- package/docker/db/000000_users.up.sql +29 -0
- package/docker/db/{001-seed.sql → 000001_seed.up.sql} +1 -0
- package/docker/db/{002-rls.sql → 000002_rls.up.sql} +53 -5
- package/docker/db/000003_keto.up.sql +1 -0
- package/docker/db/000005_neon_rls.up.sql +23 -0
- package/docker/db/000006_db_events.up.sql +28 -0
- package/docker/db/000007_add_rbac_system.up.sql +33 -0
- package/docker/db/000008_stripe_id_history.up.sql +2 -0
- package/docker/db/000009_not_null_fix.up.sql +15 -0
- package/docker/db/000010_add_role_templates.up.sql +29 -0
- package/docker/db/000011_add_subject_relations.up.sql +7 -0
- package/docker/db/000012_stripe_webhooks.up.sql +21 -0
- package/docker/db/000013_stripe_webhooks_connect.up.sql +5 -0
- package/docker/db/000014_add_enterprise_pricing.up.sql +11 -0
- package/docker/docker-compose.base.yml +326 -0
- package/docker/docker-compose.dev.yml +15 -270
- package/docker/docker-compose.local.yml +15 -0
- package/docker/docker-compose.perf-test.yml +58 -0
- package/docker/docker-compose.test.yml +43 -0
- package/docker/pgbouncer/pgbouncer.ini +51 -0
- package/package.json +16 -6
- package/templates/.omnibase-config +1 -1
- package/templates/db/README.md +91 -0
- package/templates/environments/.env.dev +8 -31
- package/templates/environments/.env.local +34 -0
- package/templates/environments/.env.prod +8 -9
- package/templates/environments/.env.staging +8 -9
- package/templates/permissions/roles.config.json +38 -0
- package/templates/permissions/tenants.ts +28 -12
- package/templates/{stripe.config.json → stripe/example.config.json} +14 -0
- package/templates/{edge → workers}/package.json +1 -0
- package/templates/{edge → workers}/src/index.ts +3 -1
- package/docker/db/003-keto.sql +0 -1
- package/docker/docker-compose.yml +0 -258
- package/templates/edge/dev.ts +0 -13
- /package/docker/db/{004-email.sql → 000004_email.up.sql} +0 -0
- /package/templates/{edge → workers}/bun.lock +0 -0
- /package/templates/{edge → workers}/tsconfig.json +0 -0
- /package/templates/{edge → workers}/wrangler.toml +0 -0
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
# API Configuration
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# OmniBase API Configuration
|
|
2
|
+
OMNIBASE_API_URL=https://api.omnibase.io
|
|
3
|
+
OMNIBASE_SERVICE_KEY=your-service-key-here
|
|
4
|
+
OMNIBASE_PROJECT_ID=SOME-UUID
|
|
5
|
+
|
|
6
|
+
# Managed Hosting API (for cloud operations like worker deployment)
|
|
7
|
+
MANAGED_HOSTING_API_URL=https://api.omnibase.io
|
|
4
8
|
|
|
5
9
|
# Required: Auth Configuration
|
|
6
10
|
WEBSITE_URL=https://your-app.com
|
|
7
11
|
COOKIE_SECRET=PLEASE-CHANGE-ME-I-AM-VERY-INSECURE
|
|
8
|
-
CIPHER_SECRET=32-LONG-SECRET-NOT-SECURE-AT-ALL
|
|
9
|
-
|
|
10
|
-
# Stripe Configuration (update with your keys)
|
|
11
|
-
STRIPE_SECRET_KEY=stripe-secret-key
|
|
12
|
-
STRIPE_PUBLISHABLE_KEY=stripe-publishable-key
|
|
13
|
-
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret_here
|
|
12
|
+
CIPHER_SECRET=32-LONG-SECRET-NOT-SECURE-AT-ALL
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
# API Configuration
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# OmniBase API Configuration
|
|
2
|
+
OMNIBASE_API_URL=https://staging.api.omnibase.io
|
|
3
|
+
OMNIBASE_SERVICE_KEY=your-service-key-here
|
|
4
|
+
OMNIBASE_PROJECT_ID=SOME-UUID
|
|
5
|
+
|
|
6
|
+
# Managed Hosting API (for cloud operations like worker deployment)
|
|
7
|
+
MANAGED_HOSTING_API_URL=https://staging.api.omnibase.io
|
|
4
8
|
|
|
5
9
|
# Required: Auth Configuration
|
|
6
10
|
WEBSITE_URL=https://staging.your-app.com
|
|
7
11
|
COOKIE_SECRET=PLEASE-CHANGE-ME-I-AM-VERY-INSECURE
|
|
8
|
-
CIPHER_SECRET=32-LONG-SECRET-NOT-SECURE-AT-ALL
|
|
9
|
-
|
|
10
|
-
# Stripe Configuration (update with your keys)
|
|
11
|
-
STRIPE_SECRET_KEY=stripe-secret-key
|
|
12
|
-
STRIPE_PUBLISHABLE_KEY=stripe-publishable-key
|
|
13
|
-
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret_here
|
|
12
|
+
CIPHER_SECRET=32-LONG-SECRET-NOT-SECURE-AT-ALL
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"roles": [
|
|
3
|
+
{
|
|
4
|
+
"role": "owner",
|
|
5
|
+
"permissions": [
|
|
6
|
+
"tenant#can_delete_tenant",
|
|
7
|
+
"tenant#can_invite_user",
|
|
8
|
+
"tenant#can_remove_user",
|
|
9
|
+
"tenant#can_update_user_role",
|
|
10
|
+
"tenant#can_view_users",
|
|
11
|
+
"tenant#can_create_roles",
|
|
12
|
+
"tenant#can_update_roles",
|
|
13
|
+
"tenant#can_delete_roles"
|
|
14
|
+
],
|
|
15
|
+
"immutable": true
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"role": "admin",
|
|
19
|
+
"permissions": [
|
|
20
|
+
"tenant#can_invite_user",
|
|
21
|
+
"tenant#can_remove_user",
|
|
22
|
+
"tenant#can_update_user_role",
|
|
23
|
+
"tenant#can_view_users",
|
|
24
|
+
"tenant#can_create_roles",
|
|
25
|
+
"tenant#can_update_roles",
|
|
26
|
+
"tenant#can_delete_roles"
|
|
27
|
+
],
|
|
28
|
+
"immutable": false
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"role": "member",
|
|
32
|
+
"permissions": [
|
|
33
|
+
"tenant#can_view_users"
|
|
34
|
+
],
|
|
35
|
+
"immutable": false
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
@@ -4,31 +4,47 @@ class User implements Namespace {}
|
|
|
4
4
|
|
|
5
5
|
class Tenant implements Namespace {
|
|
6
6
|
related: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
members: User[];
|
|
10
|
-
can_invite_users: User[];
|
|
7
|
+
can_delete_tenant: User[];
|
|
8
|
+
can_invite_user: User[];
|
|
11
9
|
can_update_user_role: User[];
|
|
12
10
|
can_remove_user: User[];
|
|
11
|
+
can_view_users: User[];
|
|
12
|
+
can_create_roles: User[];
|
|
13
|
+
can_update_roles: User[];
|
|
14
|
+
can_delete_roles: User[];
|
|
15
|
+
can_remove_owner_role: User[];
|
|
16
|
+
can_update_user_role_to_owner: User[];
|
|
13
17
|
};
|
|
14
18
|
|
|
15
19
|
permits = {
|
|
16
20
|
invite_user: (ctx: Context): boolean =>
|
|
17
|
-
this.related.
|
|
18
|
-
this.related.admins.includes(ctx.subject) ||
|
|
19
|
-
this.related.can_invite_users.includes(ctx.subject),
|
|
21
|
+
this.related.can_invite_user.includes(ctx.subject),
|
|
20
22
|
|
|
21
23
|
delete_tenant: (ctx: Context): boolean =>
|
|
22
|
-
this.related.
|
|
24
|
+
this.related.can_delete_tenant.includes(ctx.subject),
|
|
23
25
|
|
|
24
26
|
remove_user: (ctx: Context): boolean =>
|
|
25
|
-
this.related.owners.includes(ctx.subject) ||
|
|
26
|
-
this.related.admins.includes(ctx.subject) ||
|
|
27
27
|
this.related.can_remove_user.includes(ctx.subject),
|
|
28
28
|
|
|
29
29
|
update_user_role: (ctx: Context): boolean =>
|
|
30
|
-
this.related.owners.includes(ctx.subject) ||
|
|
31
|
-
this.related.admins.includes(ctx.subject) ||
|
|
32
30
|
this.related.can_update_user_role.includes(ctx.subject),
|
|
31
|
+
|
|
32
|
+
view_users: (ctx: Context): boolean =>
|
|
33
|
+
this.related.can_view_users.includes(ctx.subject),
|
|
34
|
+
|
|
35
|
+
create_roles: (ctx: Context): boolean =>
|
|
36
|
+
this.related.can_create_roles.includes(ctx.subject),
|
|
37
|
+
|
|
38
|
+
update_roles: (ctx: Context): boolean =>
|
|
39
|
+
this.related.can_update_roles.includes(ctx.subject),
|
|
40
|
+
|
|
41
|
+
delete_roles: (ctx: Context): boolean =>
|
|
42
|
+
this.related.can_delete_roles.includes(ctx.subject),
|
|
43
|
+
|
|
44
|
+
remove_owner_role: (ctx: Context): boolean =>
|
|
45
|
+
this.related.can_remove_owner_role.includes(ctx.subject),
|
|
46
|
+
|
|
47
|
+
update_user_role_to_owner: (ctx: Context): boolean =>
|
|
48
|
+
this.related.can_update_user_role_to_owner.includes(ctx.subject),
|
|
33
49
|
};
|
|
34
50
|
}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
|
+
"webhooks": [
|
|
4
|
+
{
|
|
5
|
+
"id": "default-webhook",
|
|
6
|
+
"url": "https://your-app.com/webhook/stripe",
|
|
7
|
+
"connect": false,
|
|
8
|
+
"events": [
|
|
9
|
+
"customer.subscription.created",
|
|
10
|
+
"customer.subscription.updated",
|
|
11
|
+
"customer.subscription.deleted",
|
|
12
|
+
"invoice.paid",
|
|
13
|
+
"invoice.payment_failed"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
],
|
|
3
17
|
"products": [
|
|
4
18
|
{
|
|
5
19
|
"id": "prod_test_basic",
|
package/docker/db/003-keto.sql
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
CREATE SCHEMA IF NOT EXISTS keto
|
|
@@ -1,258 +0,0 @@
|
|
|
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/templates/edge/dev.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import app from "./src/index";
|
|
2
|
-
|
|
3
|
-
Bun.serve({
|
|
4
|
-
port: parseInt(process.env.PORT || "8787", 10),
|
|
5
|
-
fetch(req) {
|
|
6
|
-
// Inject process.env as bindings to mimic Cloudflare Workers
|
|
7
|
-
return app.fetch(req, process.env as any);
|
|
8
|
-
},
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
console.log(
|
|
12
|
-
`🚀 Edge functions running at http://localhost:${process.env.PORT || 8787}`
|
|
13
|
-
);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|