Comments (11)
I hacked together a multi stage dockerfile for the Frontend. With it, you don't need to install anything on your host to build it:
I think it works, but i hacked it together and wanted to share it before i forget about it.
Btw. it doesn't build with nodejs 12 and there are plenty of warnings and deprecations for the used libs. So be careful if you put out the Frontend without protection.
FROM ubuntu:20.04 as build
RUN apt update && apt install -y curl sudo
RUN curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
RUN apt update && apt install --no-install-recommends --no-install-suggests -y nodejs python2.7 build-essential
WORKDIR /dist
COPY . .
RUN npm install && npm run compile
FROM nginx:latest
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y curl
# Set a timezone
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY default /etc/nginx/conf.d/default.conf
COPY --from=build /dist/dist /usr/share/nginx/html
CMD echo $api > /usr/share/nginx/html/apiUrl.txt && nginx -g "daemon off;"
HEALTHCHECK --interval=5s --timeout=30s --retries=50 \
CMD curl -f localhost:80 || exit 1
from ambar.
I had this same issue. Take a look at step 3
- If compiling this on a different machine than what you're deploying on then before performing compile
export PORT={YOUR_WEB_FRONTEND_PORT)
andexport FRONTEND_HOST={YOUR_HOST_IP}
. I used 80 and 192.168.1.1.
If you compiling in a docker on the same machine (as I was) you'll also need to do this. Try setting these variables and see if this helps.
from ambar.
Instead of:
npm install && npm run compile
Try:
npm install && npm run deploy:prd
It worked for me.
It generated the files in ./FrontEnd/dist
without fixed IP and Port.
from ambar.
THX
i build all but when docker start i have infinite loading screen and white board on localhost:82 in logs i dont see any errors. Anyone have similar problem ?
from ambar.
Unfortunately, it's still the same.
its look it connect to 172.17.0.2:3000 and cant connect to backend. I use this Export command i rebuild docker but still have this problem.
I may use them incorrectly or something
from ambar.
THX
i build all but when docker start i have infinite loading screen and white board on localhost:82 in logs i dont see any errors. Anyone have similar problem ?
I've following the instruction above. Unfortunately, I face the same issue.
there are no problem while docker-compose up. But, when I open {ipAddress}:82 it's only show white blank page with "Loading..." title
What did I miss?
from ambar.
Unfortunately I cannot test as I have decided to stop using Ambar.
This is because 9 containers for document search is too many. Also ElasticSearch image seemed to always be using the CPU. I think Ambar was overkill for my purposes (home document scan search).
from ambar.
Unfortunately I cannot test as I have decided to stop using Ambar.
This is because 9 containers for document search is too many. Also ElasticSearch image seemed to always be using the CPU. I think Ambar was overkill for my purposes (home document scan search).
Of course, windows indexing does a great job of searching through less than a million documents.
from ambar.
THX
i build all but when docker start i have infinite loading screen and white board on localhost:82 in logs i dont see any errors. Anyone have similar problem ?I've following the instruction above. Unfortunately, I face the same issue.
there are no problem while docker-compose up. But, when I open {ipAddress}:82 it's only show white blank page with "Loading..." title
What did I miss?
Hi, I think I found solution for my problem. Based on my trial in the last two days, I think the problem is the network config in docker-compose.yml.
When I tried the scenario to expose all service port to the host, frontend page appeared as it should. But, not when all service tried to connect each other via docker network.
It's good, finally the frontend page could be accessed. But, I'm sure that not a good choice to expose all the service port to the host which means our server would be more vulnerable from attacks.
Communication via docker network still being the best practice.
And then, I tried to modify docker-compose.yml by specifying network driver : bridge.
Voila, everything works good now.
Hopefully, this will help everyone who face the same issue
from ambar.
THX
i build all but when docker start i have infinite loading screen and white board on localhost:82 in logs i dont see any errors. Anyone have similar problem ?I've following the instruction above. Unfortunately, I face the same issue.
there are no problem while docker-compose up. But, when I open {ipAddress}:82 it's only show white blank page with "Loading..." title
What did I miss?Hi, I think I found solution for my problem. Based on my trial in the last two days, I think the problem is the network config in docker-compose.yml.
When I tried the scenario to expose all service port to the host, frontend page appeared as it should. But, not when all service tried to connect each other via docker network.
It's good, finally the frontend page could be accessed. But, I'm sure that not a good choice to expose all the service port to the host which means our server would be more vulnerable from attacks.
Communication via docker network still being the best practice.
And then, I tried to modify docker-compose.yml by specifying network driver : bridge.Voila, everything works good now.
Hopefully, this will help everyone who face the same issue
I tried modifying docker-compose.yml with network driver: bridge, but I'm getting an error. Can you show your final docker-compose as I'm having the same issue as you are?
from ambar.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from ambar.
Related Issues (20)
- docker-compose file for building HOT 4
- Context for search results HOT 1
- EPUB, MARKDOWN support HOT 1
- PayPal: We’re sorry, the merchant doesn’t accept payments in your currency. Please return to the merchant and choose another way to pay. HOT 1
- Error building FrontEnd HOT 4
- How to crawl binary files (pdf, word etc) stored in remote website? HOT 1
- Ambar cannot search using tags that were manually added via API HOT 1
- Unhealthy containers HOT 1
- Frontend compile error related to node-saas HOT 4
- Is this project dead? HOT 3
- => ERROR [5/5] COPY dist /usr/share/nginx/html HOT 4
- Demo not working? HOT 2
- Is there a detailed API documentation? HOT 2
- Container is unhealthy HOT 1
- Optional "Disable OCR"-Flag for Crawler HOT 5
- adding a new file format HOT 1
- website down? ambar.cloud HOT 1
- Prebuilt images fail to start on Ubuntu 20.04 focal HOT 5
- no basic auth credentials
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ambar.