Closed iperdomo closed 8 years ago
@orifito in the proxy
container we need to serve always index.html
so the /
location looks like this:
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
}
This is because the SPA uses some special routing that doesn't exist physically, e.g.:
http://host/library
http://host/datasets
http://host/visualisations
All those URLs are index.html
behind the scenes.
@iperdomo cool, thanks for testing that!
@orifito i found a solution to my problem of not fiding a Procfile
... it was the WORKDIR
directive.
diff --git a/docker/dash/proxy/Dockerfile b/docker/dash/proxy/Dockerfile
index 1e6bba6..e2b4a52 100644
--- a/docker/dash/proxy/Dockerfile
+++ b/docker/dash/proxy/Dockerfile
@@ -7,9 +7,8 @@ RUN apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
-WORKDIR /tmp
-
-RUN git clone https://github.com/akvo/akvo-dash.git && \
+RUN cd /tmp && \
+ git clone https://github.com/akvo/akvo-dash.git && \
cd akvo-dash/client && \
npm set progress=false && \
npm install && \
@@ -17,4 +16,4 @@ RUN git clone https://github.com/akvo/akvo-dash.git && \
cp index.html /usr/share/nginx/html && \
mkdir /usr/share/nginx/html/assets && \
cp dist/* /usr/share/nginx/html/assets && \
- cd /tmp && rm -rf akvo-dash
\ No newline at end of file
+ cd /tmp && rm -rf akvo-dash
@iperdomo great! I'll include that change :+1:
We want to use Docker to deploy the current (prototype) version of Akvo Dash.
There are 2 parts:
index.html
+bundle.js
those can be served directly via nginxhttp://localhost:3000/api
).The backend needs access to a PostgreSQL 9.4 service