Skip to content

Commit 6a3363e

Browse files
committed
Merge branch 'develop'
2 parents b05638b + 2093c7c commit 6a3363e

File tree

6 files changed

+47
-4
lines changed

6 files changed

+47
-4
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 SIL International
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

docker-compose.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# https://docs.docker.com/compose/compose-file
22
# https://github.com/compose-spec/compose-spec/blob/master/spec.md
33
version: '3.5'
4+
5+
# networks:
6+
# lexbox:
7+
# name: lexbox_default
8+
# external: true
9+
# default:
10+
411
services:
512
ui-builder:
613
build:
@@ -37,14 +44,20 @@ services:
3744
- mail
3845
- ld-api
3946
- lfmerge
47+
# networks:
48+
# - default
49+
# - lexbox
4050
environment:
41-
- WAIT_HOSTS=db:27017, mail:25
51+
- WAIT_HOSTS=lf-db:27017, mail:25
4252
- XDEBUG_MODE=develop,debug
4353
- LDAPI_BASE_URL=http://ld-api:3000/api/v2/
54+
# Uncomment this to test getting the LD project list from LexBox
55+
# To use LexBox locally (in docker) you'll also need to uncomment the networks here and at the top of the file
56+
#- LEX_BOX_HOST=https://staging.languagedepot.org #lexbox-api:5158
4457
- ENVIRONMENT=development
4558
- WEBSITE=localhost
4659
- DATABASE=scriptureforge
47-
- MONGODB_CONN=mongodb://db:27017
60+
- MONGODB_CONN=mongodb://lf-db:27017
4861
- MAIL_HOST=mail
4962
- GOOGLE_CLIENT_ID=bogus-development-token
5063
- GOOGLE_CLIENT_SECRET=bogus-development-token

docker/deployment/app-deployment.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ spec:
138138
secretKeyRef:
139139
key: LANGUAGE_DEPOT_API_TOKEN
140140
name: ld-api
141+
- name: LEX_BOX_HOST
142+
valueFrom:
143+
secretKeyRef:
144+
key: LEX_BOX_HOST
145+
name: ld-api
141146
- name: FACEBOOK_CLIENT_ID
142147
valueFrom:
143148
secretKeyRef:

docker/deployment/secrets.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ metadata:
1818
data:
1919
LANGUAGE_DEPOT_API_TOKEN: ''
2020
LDAPI_BASE_URL: ''
21+
LEX_BOX_HOST: ''
2122

2223
---
2324

docker/lfmerge/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
FROM ghcr.io/sillsdev/lfmerge:2.0.134
1+
FROM ghcr.io/sillsdev/lfmerge:2.0.135
22
# Do not add anything to this Dockerfile, it should stay empty

src/Api/Model/Languageforge/Lexicon/Command/SendReceiveCommands.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,12 @@ public static function getUserProjects($username, $password, array $mockResponse
8888
}
8989
$client = new Client(["handler" => $handler]);
9090

91-
$url = "https://admin.languagedepot.org/api/user/" . $username . "/projects";
91+
$host = getenv("LEX_BOX_HOST") ?: "https://admin.languagedepot.org";
92+
$url = $host . "/api/user/" . $username . "/projects";
9293
$postData = [
9394
"json" => ["password" => $password],
95+
// Also supported:
96+
// "form_params" => ["password" => $password],
9497
"headers" => ["Authorization" => "Bearer " . LANGUAGE_DEPOT_API_TOKEN],
9598
];
9699

0 commit comments

Comments
 (0)