Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hahn-kev committed Sep 13, 2023
2 parents b05638b + 2093c7c commit 6a3363e
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 4 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 SIL International

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
17 changes: 15 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# https://docs.docker.com/compose/compose-file
# https://github.com/compose-spec/compose-spec/blob/master/spec.md
version: '3.5'

# networks:
# lexbox:
# name: lexbox_default
# external: true
# default:

services:
ui-builder:
build:
Expand Down Expand Up @@ -37,14 +44,20 @@ services:
- mail
- ld-api
- lfmerge
# networks:
# - default
# - lexbox
environment:
- WAIT_HOSTS=db:27017, mail:25
- WAIT_HOSTS=lf-db:27017, mail:25
- XDEBUG_MODE=develop,debug
- LDAPI_BASE_URL=http://ld-api:3000/api/v2/
# Uncomment this to test getting the LD project list from LexBox
# To use LexBox locally (in docker) you'll also need to uncomment the networks here and at the top of the file
#- LEX_BOX_HOST=https://staging.languagedepot.org #lexbox-api:5158
- ENVIRONMENT=development
- WEBSITE=localhost
- DATABASE=scriptureforge
- MONGODB_CONN=mongodb://db:27017
- MONGODB_CONN=mongodb://lf-db:27017
- MAIL_HOST=mail
- GOOGLE_CLIENT_ID=bogus-development-token
- GOOGLE_CLIENT_SECRET=bogus-development-token
Expand Down
5 changes: 5 additions & 0 deletions docker/deployment/app-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ spec:
secretKeyRef:
key: LANGUAGE_DEPOT_API_TOKEN
name: ld-api
- name: LEX_BOX_HOST
valueFrom:
secretKeyRef:
key: LEX_BOX_HOST
name: ld-api
- name: FACEBOOK_CLIENT_ID
valueFrom:
secretKeyRef:
Expand Down
1 change: 1 addition & 0 deletions docker/deployment/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ metadata:
data:
LANGUAGE_DEPOT_API_TOKEN: ''
LDAPI_BASE_URL: ''
LEX_BOX_HOST: ''

---

Expand Down
2 changes: 1 addition & 1 deletion docker/lfmerge/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM ghcr.io/sillsdev/lfmerge:2.0.134
FROM ghcr.io/sillsdev/lfmerge:2.0.135
# Do not add anything to this Dockerfile, it should stay empty
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,12 @@ public static function getUserProjects($username, $password, array $mockResponse
}
$client = new Client(["handler" => $handler]);

$url = "https://admin.languagedepot.org/api/user/" . $username . "/projects";
$host = getenv("LEX_BOX_HOST") ?: "https://admin.languagedepot.org";
$url = $host . "/api/user/" . $username . "/projects";
$postData = [
"json" => ["password" => $password],
// Also supported:
// "form_params" => ["password" => $password],
"headers" => ["Authorization" => "Bearer " . LANGUAGE_DEPOT_API_TOKEN],
];

Expand Down

0 comments on commit 6a3363e

Please sign in to comment.