Comments (11)
It is back up now
from units.
Are you actually using it?
from units.
Thanks! Yeah, but we are looking into a more permanent solution, as the usage got a bit higher than expected.
from units.
The webserver is pretty easy to run locally. Right now it is just running a docker image from docker hub on an AWS instance. You can run that docker locally or just compile the webserver and run that on whatever you like. Curious what you are doing with it.
And it looked like the docker server just stopped for some unknown reason, so I just restarted it.
from units.
Cool, so in theory, we could set up something in our AWS and use that instead?
We have an app that generates some configuration files that we configure our hardware with. We are doing some readings on pressure and temperature and such, and needed a way to convert to the desired units.
We've been calling your REST API for that, but the number of conversions were higher than expected, so I am a bit worried we are calling your service more than it was built for. We have a meeting today to set up something running on our side, so that should fix it. Ps, great library that you have built :)
from units.
So I am currently trying to build a docker image using your Docker file in the webserver folder, but it seems to be failing to find the units_webserver in the build folder.
#13 0.387 cp: cannot stat '../build/webserver/units_webserver': No such file or directory
#13 ERROR: executor failed running [/bin/sh -c cp ../build/webserver/units_webserver .]: exit code: 1
Do you have any theories to what could be wrong?
Also (can't hurt to ask), do you have an official docker image that is available to the public?
from units.
So, I had to change this line in your Docker file order to make it build the image:
RUN cp ../build/webserver/units_webserver . && cp ../units/webserver/*.html . && cp ../units/webserver/*.sh .
to
RUN cp ../build/bin/units_webserver . && cp ../units/webserver/*.html . && cp ../units/webserver/*.sh .
I also updated the version label to 0.5.0.
from units.
hmm, haven't looked at the dockerhub in a while. Guess it isn't updating anymore, looks like the webhooks changed
Anyway
https://hub.docker.com/repository/docker/phlptp/units/general
is supposed to be where some docker images get generated and are publicly available but looks like it isn't updating. I will see if I can get that working again and update the dockerfile.
from units.
Thank you, that would be super :)
from units.
The docker hub images are updated and working again
Here is a script I run on my EC2 instance
#!/usr/bin/bash
docker logs units_webserver &> /home/ec2-user/weblog/weblog$(date "+%s").log
docker stop units_webserver
docker container rm units_webserver
docker pull phlptp/units:webserver
docker run --name units_webserver -p80:80 -d phlptp/units:webserver
I think I run this once a day to automatically get the latest images and regenerate the server if it had stopped
from units.
regenerate the server if it had stopped
You can use Docker restart policies in combination with health check command (either in Dockerfile or as docker run
options).
from units.
Related Issues (20)
- Convert to inverse unit incorrect HOT 1
- Issues with parsing single-letter prefixes such as for `atto` HOT 7
- CleanUnitString breaks on 0.2 and 0.3 HOT 1
- Strange choice of units in to_string HOT 6
- "kg m" is parsed as "kg" HOT 1
- Surprising parse results with `.` and `-` HOT 4
- Question about to_string() function HOT 8
- Format arbitrary unit nicely HOT 4
- Degrees celsius get converted to Kelvin in operations HOT 6
- Function to remove a single user defined unit HOT 2
- Try to start a PR for adding support for KPa, MPa, GPa but permission denied HOT 3
- Using to_string for scalars causes crashes HOT 2
- Use of uninitialised memory in unit maps HOT 7
- "Stress testing" units' string parsing HOT 8
- Favoring SI base units in string formatting? HOT 3
- to_string strange output HOT 4
- expression did not evaluate to a constant HOT 4
- Unary negation of measurements HOT 1
- Please consider to use the googletest package instead of requiring the googletest source tree
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 units.