create-seamless 0.0.4 → 0.0.5
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/index.js +29 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -72,7 +72,7 @@ const skipGit = hasFlag("no-git");
|
|
|
72
72
|
|
|
73
73
|
const authPort = getFlag("auth-port", "5312");
|
|
74
74
|
const apiPort = getFlag("api-port", "3000");
|
|
75
|
-
const webPort = getFlag("web-port", "
|
|
75
|
+
const webPort = getFlag("web-port", "5001");
|
|
76
76
|
|
|
77
77
|
const wantsSomething = includeAuth || includeWeb || includeApi;
|
|
78
78
|
const AUTH = wantsSomething ? includeAuth : true;
|
|
@@ -246,11 +246,15 @@ services:
|
|
|
246
246
|
container_name: seamless-auth
|
|
247
247
|
build: ./auth
|
|
248
248
|
ports:
|
|
249
|
-
- "
|
|
249
|
+
- "${authPort}:${authPort}"
|
|
250
250
|
env_file:
|
|
251
251
|
- ./auth/.env
|
|
252
|
+
environment:
|
|
253
|
+
- DB_HOST: db
|
|
254
|
+
- ISSUER=http://auth:${authPort}
|
|
252
255
|
volumes:
|
|
253
256
|
- ./auth:/app
|
|
257
|
+
- /app/node_modules
|
|
254
258
|
depends_on:
|
|
255
259
|
- db
|
|
256
260
|
|
|
@@ -258,11 +262,14 @@ services:
|
|
|
258
262
|
container_name: seamless-api
|
|
259
263
|
build: ./api
|
|
260
264
|
ports:
|
|
261
|
-
- "
|
|
265
|
+
- "${apiPort}:${apiPort}"
|
|
262
266
|
env_file:
|
|
263
267
|
- ./api/.env
|
|
268
|
+
environment:
|
|
269
|
+
- AUTH_SERVER_URL=http://auth:${authPort}
|
|
264
270
|
volumes:
|
|
265
271
|
- ./api:/app
|
|
272
|
+
- /app/node_modules
|
|
266
273
|
depends_on:
|
|
267
274
|
- auth
|
|
268
275
|
- db
|
|
@@ -271,11 +278,12 @@ services:
|
|
|
271
278
|
container_name: seamless-web
|
|
272
279
|
build: ./web
|
|
273
280
|
ports:
|
|
274
|
-
- "
|
|
281
|
+
- "${webPort}:${webPort}"
|
|
275
282
|
env_file:
|
|
276
283
|
- ./web/.env
|
|
277
284
|
volumes:
|
|
278
285
|
- ./web:/app
|
|
286
|
+
- /app/node_modules
|
|
279
287
|
depends_on:
|
|
280
288
|
- auth
|
|
281
289
|
- api
|
|
@@ -350,7 +358,11 @@ async function downloadRepo(repo, dest) {
|
|
|
350
358
|
DEFAULT_ROLES: "user,betaUser",
|
|
351
359
|
AVAILABLE_ROLES: "user,admin,betaUser,team",
|
|
352
360
|
|
|
353
|
-
|
|
361
|
+
DB_HOST: "localhost",
|
|
362
|
+
DB_PORT: "5432",
|
|
363
|
+
DB_NAME: "seamless-auth",
|
|
364
|
+
DB_USER: "myuser",
|
|
365
|
+
DB_PASSWORD: "mypassword",
|
|
354
366
|
|
|
355
367
|
ACCESS_TOKEN_TTL: "30m",
|
|
356
368
|
REFRESH_TOKEN_TTL: "1h",
|
|
@@ -374,10 +386,16 @@ async function downloadRepo(repo, dest) {
|
|
|
374
386
|
|
|
375
387
|
writeEnv(dir, {
|
|
376
388
|
AUTH_SERVER_URL: `http://localhost:${authPort}`,
|
|
377
|
-
APP_ORIGIN: `http://localhost:${
|
|
389
|
+
APP_ORIGIN: `http://localhost:${webPort}`,
|
|
378
390
|
COOKIE_SIGNING_KEY: randomBytes(32).toString("hex"),
|
|
379
391
|
API_SERVICE_TOKEN: API_SERVICE_TOKEN,
|
|
380
|
-
|
|
392
|
+
|
|
393
|
+
DB_HOST: "localhost",
|
|
394
|
+
DB_PORT: "5432",
|
|
395
|
+
DB_NAME: "seamless-auth",
|
|
396
|
+
DB_USER: "myuser",
|
|
397
|
+
DB_PASSWORD: "mypassword",
|
|
398
|
+
|
|
381
399
|
DB_NAME: "seamless",
|
|
382
400
|
SQL_LOGGING: "false",
|
|
383
401
|
});
|
|
@@ -429,6 +447,10 @@ Start development:
|
|
|
429
447
|
# terminal 3
|
|
430
448
|
cd web && npm i && npm run dev
|
|
431
449
|
|
|
450
|
+
or if using Docker
|
|
451
|
+
|
|
452
|
+
docker compose up
|
|
453
|
+
|
|
432
454
|
Docs: https://docs.seamlessauth.com/docs
|
|
433
455
|
Happy hacking. 🚀
|
|
434
456
|
`);
|