Skip to content

Commit

Permalink
Add users-permissions plugin config
Browse files Browse the repository at this point in the history
  • Loading branch information
debdutdeb authored and Dnouv committed Nov 3, 2022
1 parent 5511c63 commit b70060b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ jobs:
- name: Start cms
run: cd cms; npm run develop &> /tmp/cms.log &
env: { INITIALIZE_DATA: "true" }
env:
INITIALIZE_DATA: "true"

- name: Check cms running
uses: actions/github-script@v5
Expand All @@ -48,8 +49,8 @@ jobs:
script: |
const http = require('http');
const {readFileSync} = require('fs');
core.info('waiting 3 minute for strapi data initialization to complete ..');
await new Promise(zzz => setTimeout(zzz, 3 * 60 * 1000));
core.info('waiting 1 minute for strapi data initialization to complete ..');
await new Promise(zzz => setTimeout(zzz, 1 * 60 * 1000));
http
.request(`http://localhost:${process.env.PORT}/_health`, { method: 'HEAD' }, r => {
if (r.statusCode === 204 && r.headers.strapi === 'You are so French!')
Expand Down
9 changes: 9 additions & 0 deletions cms/config/plugins.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const crypto = require('crypto');

module.exports = ({ env }) => ({
'users-permissions': {
config: {
jwtSecret: env('JWT_SECRET') || crypto.randomBytes(32).toString('base64'),
},
},
});

0 comments on commit b70060b

Please sign in to comment.