Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions eodag/docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
server {
listen 80 default_server;
listen [::]:80 default_server;

root /usr/share/nginx/html;
index index.html index.htm;

server_name _;

location / {
try_files $uri $uri/ =404;
# Path to your client application files (HTML, CSS, JavaScript, etc.)
root /usr/share/nginx/html;
index index.html index.htm;

try_files $uri $uri/ /index.html;
}

location /api/ {
# Proxy pass to your API server running on port 5000
proxy_pass http://127.0.0.1:5000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}


}

10 changes: 8 additions & 2 deletions eodag/docker/run-stac-server-browser.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
#!/bin/bash
# some pre-start operation

nginx

LOGGING_OPTIONS=""
re='^[0-9]+$'
if [[ ${EODAG_LOGGING} =~ $re ]] && [ "${EODAG_LOGGING} " -gt "0" ]; then
LOGGING_OPTIONS="-"$(printf '%0.sv' $(seq 1 ${EODAG_LOGGING}))
else
echo "Logging level can be changed using EODAG_LOGGING environment variable [1-3]"
fi

#export EODAG_CORS_ALLOWED_ORIGINS=http://127.0.0.1:5001

# start
exec "$@" &
exec eodag $LOGGING_OPTIONS serve-rest -w
exec "$@" &
exec eodag $LOGGING_OPTIONS serve-rest -w
10 changes: 6 additions & 4 deletions eodag/docker/server-stac-browser.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y git

#clone repository
RUN git clone https://github.com/radiantearth/stac-browser.git
#RUN git clone https://github.com/radiantearth/stac-browser.git
COPY ./stac-browser /stac-browser

# move to folder
WORKDIR /stac-browser
Expand All @@ -18,7 +19,7 @@ WORKDIR /stac-browser
RUN npm install

# start application
RUN npm run build -- --catalogUrl=http://localhost:5000
RUN npm run build

##########################
# BROWSER #
Expand Down Expand Up @@ -103,11 +104,12 @@ COPY --from=build-stac /stac-browser/dist /usr/share/nginx/html
COPY ./docker/run-stac-server-browser.sh /eodag/run-stac-server.sh

# and make executable
RUN chmod +x /eodag/run-stac-server.sh
RUN chmod +x /eodag/run-stac-server.sh && \
apt update && apt install -y htop

# switch to non-root user
#USER user

# Ecrire un nouveau fichier SH pour exécuter STAC et Browser
CMD ["/usr/sbin/nginx", "-g", "daemon off;"]
#CMD ["/usr/sbin/nginx", "-g", "daemon off;"]
#ENTRYPOINT ["/eodag/run-stac-server.sh"]
2 changes: 1 addition & 1 deletion eodag/interactivetool_eodag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
mkdir -p ./galaxy/outputs &&
chmod -R 777 ./ &&
cd ./galaxy/ &&
/init
/eodag/run-stac-server.sh
]]>
</command>
<outputs>
Expand Down