@@ -72,7 +72,7 @@ const skipGit = hasFlag("no-git");
7272
7373const authPort = getFlag ( "auth-port" , "5312" ) ;
7474const apiPort = getFlag ( "api-port" , "3000" ) ;
75- const webPort = getFlag ( "web-port" , "5173 " ) ;
75+ const webPort = getFlag ( "web-port" , "5001 " ) ;
7676
7777const wantsSomething = includeAuth || includeWeb || includeApi ;
7878const AUTH = wantsSomething ? includeAuth : true ;
@@ -246,23 +246,30 @@ services:
246246 container_name: seamless-auth
247247 build: ./auth
248248 ports:
249- - "5312:5312 "
249+ - "${ authPort } : ${ authPort } "
250250 env_file:
251251 - ./auth/.env
252+ environment:
253+ - DB_HOST: db
254+ - ISSUER=http://auth:${ authPort }
252255 volumes:
253256 - ./auth:/app
257+ - /app/node_modules
254258 depends_on:
255259 - db
256260
257261 api:
258262 container_name: seamless-api
259263 build: ./api
260264 ports:
261- - "3000:3000 "
265+ - "${ apiPort } : ${ apiPort } "
262266 env_file:
263267 - ./api/.env
268+ environment:
269+ - AUTH_SERVER_URL=http://auth:${ authPort }
264270 volumes:
265271 - ./api:/app
272+ - /app/node_modules
266273 depends_on:
267274 - auth
268275 - db
@@ -271,11 +278,12 @@ services:
271278 container_name: seamless-web
272279 build: ./web
273280 ports:
274- - "5001:5001 "
281+ - "${ webPort } : ${ webPort } "
275282 env_file:
276283 - ./web/.env
277284 volumes:
278285 - ./web:/app
286+ - /app/node_modules
279287 depends_on:
280288 - auth
281289 - api
@@ -350,7 +358,11 @@ async function downloadRepo(repo, dest) {
350358 DEFAULT_ROLES : "user,betaUser" ,
351359 AVAILABLE_ROLES : "user,admin,betaUser,team" ,
352360
353- DATABASE_URL : "postgres://myuser:mypassword@localhost:5432/seamless-auth" ,
361+ DB_HOST : "localhost" ,
362+ DB_PORT : "5432" ,
363+ DB_NAME : "seamless-auth" ,
364+ DB_USER : "myuser" ,
365+ DB_PASSWORD : "mypassword" ,
354366
355367 ACCESS_TOKEN_TTL : "30m" ,
356368 REFRESH_TOKEN_TTL : "1h" ,
@@ -374,10 +386,16 @@ async function downloadRepo(repo, dest) {
374386
375387 writeEnv ( dir , {
376388 AUTH_SERVER_URL : `http://localhost:${ authPort } ` ,
377- APP_ORIGIN : `http://localhost:${ apiPort } ` ,
389+ APP_ORIGIN : `http://localhost:${ webPort } ` ,
378390 COOKIE_SIGNING_KEY : randomBytes ( 32 ) . toString ( "hex" ) ,
379391 API_SERVICE_TOKEN : API_SERVICE_TOKEN ,
380- DATABASE_URL : `postgres://myuser:mypassword@localhost:5432/seamless` ,
392+
393+ DB_HOST : "localhost" ,
394+ DB_PORT : "5432" ,
395+ DB_NAME : "seamless-auth" ,
396+ DB_USER : "myuser" ,
397+ DB_PASSWORD : "mypassword" ,
398+
381399 DB_NAME : "seamless" ,
382400 SQL_LOGGING : "false" ,
383401 } ) ;
@@ -429,6 +447,10 @@ Start development:
429447 # terminal 3
430448 cd web && npm i && npm run dev
431449
450+ or if using Docker
451+
452+ docker compose up
453+
432454Docs: https://docs.seamlessauth.com/docs
433455Happy hacking. 🚀
434456` ) ;
0 commit comments