dvsrepo
commited on
Commit
•
23f7888
1
Parent(s):
e8f86b7
add if for checking if API_KEY and pass have been set
Browse files- Dockerfile +0 -2
- start.sh +13 -1
Dockerfile
CHANGED
@@ -22,8 +22,6 @@ ARG API_KEY=$(cat /run/secrets/API_KEY)
|
|
22 |
RUN --mount=type=secret,id=PASSWORD,mode=0444,required=false
|
23 |
ARG PASSWORD=$(cat /run/secrets/PASSWORD)
|
24 |
|
25 |
-
RUN echo $PASSWORD
|
26 |
-
|
27 |
# Install Python deps
|
28 |
RUN pip3 install -U -r requirements.txt
|
29 |
|
|
|
22 |
RUN --mount=type=secret,id=PASSWORD,mode=0444,required=false
|
23 |
ARG PASSWORD=$(cat /run/secrets/PASSWORD)
|
24 |
|
|
|
|
|
25 |
# Install Python deps
|
26 |
RUN pip3 install -U -r requirements.txt
|
27 |
|
start.sh
CHANGED
@@ -1,4 +1,16 @@
|
|
1 |
|
2 |
ES_JAVA_OPTS=-'Xms512m -Xmx512m' elasticsearch -E node.name=elasticsearch -E cluster.name=es-local -E discovery.type=single-node -E cluster.routing.allocation.disk.threshold_enabled=false &
|
3 |
./wait-for-it.sh -t 30 localhost:9200
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
2 |
ES_JAVA_OPTS=-'Xms512m -Xmx512m' elasticsearch -E node.name=elasticsearch -E cluster.name=es-local -E discovery.type=single-node -E cluster.routing.allocation.disk.threshold_enabled=false &
|
3 |
./wait-for-it.sh -t 30 localhost:9200
|
4 |
+
if [ -z "$API_KEY" ] && [ -z "$PASSWORD" ]; then
|
5 |
+
python -m argilla
|
6 |
+
elif [ -z "$API_KEY" ] && [ -n "$PASSWORD" ]; then
|
7 |
+
export ARGILLA_LOCAL_AUTH_DEFAULT_PASSWORD=$PASSWORD
|
8 |
+
python -m argilla
|
9 |
+
elif [ -n "$API_KEY" ] && [ -z "$PASSWORD" ]; then
|
10 |
+
export ARGILLA_LOCAL_AUTH_DEFAULT_APIKEY=$API_KEY
|
11 |
+
python -m argilla
|
12 |
+
else
|
13 |
+
export ARGILLA_LOCAL_AUTH_DEFAULT_APIKEY=$API_KEY
|
14 |
+
export ARGILLA_LOCAL_AUTH_DEFAULT_PASSWORD=$PASSWORD
|
15 |
+
python -m argilla
|
16 |
+
fi
|