Skip to content

Commit

Permalink
PROCESS: Databases settings are pushed along with backend code.
Browse files Browse the repository at this point in the history
  • Loading branch information
benel committed Dec 26, 2024
1 parent 1afc3a6 commit a208cc8
Show file tree
Hide file tree
Showing 16 changed files with 6 additions and 653 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions backend/_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"couchdb":{"users_db_security_editable": "true"}}
1 change: 1 addition & 0 deletions backend/_users/_security.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"members":{"roles":[]},"admins":{"roles":["_admin"]}}
1 change: 1 addition & 0 deletions backend/hyperglosae/_security.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"members":{"roles":[]},"admins":{"roles":["_admin"]}}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 2 additions & 17 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,6 @@ services:
start_period: 5s
start_interval: 2s

accessible_backend:
image: curlimages/curl
entrypoint: ["/bin/sh","-c"]
command:
- |
alias put="curl -X PUT -u '${COUCHDB_USER}:${COUCHDB_PASSWORD}'"
put backend:5984/hyperglosae
put backend:5984/hyperglosae/_security --data '{"members":{"roles":[]},"admins":{"roles":["_admin"]}}'
put backend:5984/_node/nonode@nohost/_config/couchdb/users_db_security_editable --data '"true"'
put backend:5984/_users
put backend:5984/_users/_security --data '{"members":{"roles":[]},"admins":{"roles":["_admin"]}}'
depends_on:
backend:
condition: service_healthy

updated_samples:
image: node:22-slim
command: npx couchdb-bootstrap http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@backend:5984 samples
Expand All @@ -38,9 +23,9 @@ services:

updated_code:
image: node:22-slim
command: npx couchdb-push http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@backend:5984/hyperglosae app
command: npx couchdb-bootstrap http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@backend:5984 app
volumes:
- ./backend/src:/app
- ./backend:/app
depends_on:
backend:
condition: service_healthy
Expand Down
10 changes: 1 addition & 9 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ services:
file: docker-compose.dev.yml
service: backend

accessible_backend:
extends:
file: docker-compose.dev.yml
service: accessible_backend
depends_on:
backend:
condition: service_healthy

updated_samples:
extends:
file: docker-compose.dev.yml
Expand All @@ -39,7 +31,7 @@ services:
start_period: 5s
start_interval: 2s
depends_on:
accessible_backend:
updated_code:
condition: service_completed_successfully

proxy:
Expand Down
8 changes: 0 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ services:
volumes:
- ./data:/opt/couchdb/data

accessible_backend:
extends:
file: docker-compose.test.yml
service: accessible_backend
depends_on:
backend:
condition: service_healthy

updated_code:
extends:
file: docker-compose.test.yml
Expand Down
619 changes: 0 additions & 619 deletions frontend/LICENSE

This file was deleted.

0 comments on commit a208cc8

Please sign in to comment.