all repos — caroster @ 34dad5d8508701eae4ad178595fab8920fd626c4

[Octree] Group carpool to your event https://caroster.io

docs: :memo: [skip ci] Improve doc
Tim Izzo tim@5ika.ch
Thu, 30 Nov 2023 15:55:30 +0100
commit

34dad5d8508701eae4ad178595fab8920fd626c4

parent

ce9a20ceba4a84934e61c226b626bb6ef8f99000

4 files changed, 53 insertions(+), 7 deletions(-)

jump to
M README.mdREADME.md

@@ -34,7 +34,21 @@ ```

### Run with Docker -First, create containers with Docker Compose: +First, edit `docker-compose.yml` to provide your SMTP configuration: + +```yaml +version: "3" +services: + app: + ... + SMTP_HOST: smtp.myserver.org + SMTP_PORT: 587 + SMTP_USERNAME: user + SMTP_PASSWORD: password +... +``` + +Then, create containers with Docker Compose: ```shell docker compose up

@@ -64,21 +78,23 @@ ### Backend

These steps will prepare and configure the backend to run in development mode. +> You need a Postgres database running locally. Start one with `docker compose up psql -d`. + ```shell cd backend yarn # or 'npm install' cp .env.example .env -nano .env # Edit with your own configuration +vi .env # Edit with your own configuration yarn develop ``` -The Strapi API is now ready and the admin is accessible on http://localhost:1337/admin. +The Strapi server is now ready and the admin is accessible on http://localhost:1337/admin. ## Running the tests A few tests are available to check GraphQL endpoints behavior in the `e2e` directory. -First, run Strapi un test mode: +First, run Strapi in test mode: ```shell cd backend
M backend/.env.examplebackend/.env.example

@@ -1,21 +1,35 @@

+# Strapi config + STRAPI_URL=http://localhost:1337 HOST=0.0.0.0 APP_KEYS="toBeModified1,toBeModified2" API_TOKEN_SALT=tobemodified ADMIN_JWT_SECRET=tobemodified JWT_SECRET=tobemodified + +# Database + DATABASE_HOST=localhost DATABASE_PORT=5432 DATABASE_NAME=caroster DATABASE_USERNAME=postgres DATABASE_PASSWORD= -SENTRY_DSN= + +# SMTP configuration + SMTP_PORT= SMTP_HOST= SMTP_USERNAME= SMTP_PASSWORD= + +# Admin auto initialisation + INIT_ADMIN_USERNAME= INIT_ADMIN_PASSWORD= INIT_ADMIN_FIRSTNAME= INIT_ADMIN_LASTNAME= INIT_ADMIN_EMAIL= + +# Other configs + +SENTRY_DSN=
M docker-compose.ymldocker-compose.yml

@@ -22,6 +22,12 @@ INIT_ADMIN_FIRSTNAME: Admin

INIT_ADMIN_LASTNAME: Caroster INIT_ADMIN_EMAIL: admin@example.org + ## Set your SMTP configuration + # SMTP_HOST: + # SMTP_PORT: + # SMTP_USERNAME: + # SMTP_PASSWORD: + psql: image: postgres volumes:
M frontend/.env.examplefrontend/.env.example

@@ -1,7 +1,17 @@

+# Targeted backend URL STRAPI_URL=http://localhost:1337 -SENTRY_SERVER_INIT_PATH=.next/server/sentry/initServerSDK.js + +# NextAuth config + NEXTAUTH_SECRET=gewrsdfhgfh NEXTAUTH_URL=http://localhost:3000/api/nauth + +# Google authentication config + GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= -# DEFAULT_LOCALE=share + +# Other configs + +SENTRY_SERVER_INIT_PATH=.next/server/sentry/initServerSDK.js +# DEFAULT_LOCALE=share