all repos — caroster @ 46bf433cbeccdf9f532e35e5e0293b632e998fb0

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

chore: 🚀 Improve deployments
Tim Izzo tim@octree.ch
Fri, 09 Sep 2022 08:59:06 +0200
commit

46bf433cbeccdf9f532e35e5e0293b632e998fb0

parent

ad62b3b4cb36a0776a09fb9816ad74abb17a58a0

M .gitlab-ci.yml.gitlab-ci.yml

@@ -1,16 +1,3 @@

include: - project: o/infra/templates - file: /gitlab-ci/includes/jobs.yaml - -Build: - extends: .build - -Deploy Test: - extends: .deployJelastic - rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $ENVNAME - variables: - MANIFEST_PATH: manifest-jps/strapi.yml - environment: - name: Test - url: "https://$ENVNAME.hidora.com" + file: /gitlab-ci/includes/StrapiBuildDeploy.yaml
M README.mdREADME.md

@@ -26,7 +26,18 @@ git clone https://github.com/octree-gva/caroster.git

cd caroster ``` -#### Frontend +### Run with Docker + +```shell +docker build -t caroster . +cp backend/.env.example backend/.env +nano .env # Edit with your own configuration +docker run -d -p 80:80 --env-file backend/.env caroster +``` + +## Development + +### Frontend These steps will prepare the frontend to run in development mode.

@@ -38,7 +49,7 @@ ```

The frontend is now accessible on http://localhost:3000 -#### Backend +### Backend These steps will prepare and configure the backend to run in development mode.
M backend/.env.examplebackend/.env.example

@@ -1,11 +1,21 @@

-HOST=0.0.0.0 +STRAPI_URL=http://localhost:8080 +HOST=my-strapi.org APP_KEYS="toBeModified1,toBeModified2" API_TOKEN_SALT=tobemodified ADMIN_JWT_SECRET=tobemodified JWT_SECRET=tobemodified +DATABASE_HOST=localhost +DATABASE_PORT=5432 +DATABASE_NAME=caroster +DATABASE_USERNAME=postgres +DATABASE_PASSWORD= SENTRY_DSN= -SMTP_HOST= SMTP_PORT= +SMTP_HOST= SMTP_USERNAME= SMTP_PASSWORD= -STRAPI_URL=http://localhost:8080 +INIT_ADMIN_USERNAME= +INIT_ADMIN_PASSWORD= +INIT_ADMIN_FIRSTNAME= +INIT_ADMIN_LASTNAME= +INIT_ADMIN_EMAIL=
M backend/package.jsonbackend/package.json

@@ -32,7 +32,8 @@ "@strapi/plugin-users-permissions": "4.3.6",

"@strapi/provider-email-nodemailer": "^4.3.6", "@strapi/strapi": "4.3.6", "pg": "8.6.0", - "strapi-plugin-email-designer": "^2.1.1" + "strapi-plugin-email-designer": "^2.1.1", + "strapi-plugin-init-admin-user": "^0.1.3" }, "author": { "name": "A Strapi developer"
M backend/yarn.lockbackend/yarn.lock

@@ -11698,6 +11698,13 @@ spdy-transport@^3.0.0:

version "3.0.0" resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== + dependencies: + debug "^4.1.0" + detect-node "^2.0.4" + hpack.js "^2.1.6" + obuf "^1.1.2" + readable-stream "^3.0.6" + wbuf "^1.7.3" spdy@^4.0.2: version "4.0.2"

@@ -11813,6 +11820,11 @@ react-email-editor "^1.5.0"

react-github-btn "^1.2.0" react-syntax-highlighter "^15.4.3" striptags "^3.2.0" + +strapi-plugin-init-admin-user@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/strapi-plugin-init-admin-user/-/strapi-plugin-init-admin-user-0.1.3.tgz#10e2b585468fc34551550476c3f8b044fbd2dbf1" + integrity sha512-5LRaSIHqz2lN6JB7+iYmiqdVMDoI4rRLVMqx/+KwUWVu0w59wfMmRi9wjfDP2gi79ePf55JW0bAR3g5ovbUjUA== stream-browserify@^3.0.0: version "3.0.0"
M docker-entrypoint.shdocker-entrypoint.sh

@@ -1,6 +1,7 @@

#!/bin/sh # Start NGINX in daemon mode +echo "pid /run/nginx.pid;" >> /etc/nginx/nginx.conf nginx # Start NodeJS apps with PM2
M frontend/hooks/useMatomo.tsfrontend/hooks/useMatomo.ts

@@ -7,7 +7,6 @@

useEffect(() => { if (settings) { const {matomo_script_url} = settings; - console.log({matomo_script_url}); if (matomo_script_url && typeof window !== 'undefined') loadMatomo(matomo_script_url); }