Skip to content

Commit

Permalink
automatisation v2
Browse files Browse the repository at this point in the history
  • Loading branch information
VENGADESSANE committed Nov 19, 2024
1 parent cc3f11a commit e6cc4b1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/JobLinker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
npm run build
- name: Start frontend
run: |
export COUCHDB_USER="TO_BE_CHANGED"
export COUCHDB_PASSWORD="TO_BE_CHANGED"
export COUCHDB_USER="admin"
export COUCHDB_PASSWORD="admin"
docker compose up --detach
- name: Wait for frontend
uses: docker://benel/wait-for-response:1
uses: docker://paulinesaur/wait-for-response:1
with:
args: http://localhost/ 200 30000 500
- name: Measure carbon footprint
Expand Down
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,23 @@ services:
environment:
- COUCHDB_USER
- COUCHDB_PASSWORD

accessible_backend:
image: curlimages/curl
entrypoint: ["/bin/sh","-c"]
command:
- |
alias put="curl -X PUT -u '${COUCHDB_USER}:${COUCHDB_PASSWORD}'"
put backend:5984/_node/nonode@nohost/_config/chttpd/enable_cors --data '"true"'
put backend:5984/_node/nonode@nohost/_config/cors/origins --data '"*"'
put backend:5984/qvotidie
put backend:5984/qvotidie/_security --data '{"members":{"roles":[]},"admins":{"roles":["_admin"]}}'
updated_samples:
image: curlimages/curl
entrypoint: ["/bin/sh","-c"]
volumes:
- ./frontend/public/sample_data.json:/sample_data.json
command:
- |
curl -X POST http://backend:5984/database_joblinker_prot3/_bulk_docs -H "Content-Type: application/json" -d @/sample_data.json

0 comments on commit e6cc4b1

Please sign in to comment.