Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/binocarlos/moby-counter
A small app to demonstrate keeping state inside a docker-compose application
https://github.com/binocarlos/moby-counter
Last synced: 10 days ago
JSON representation
A small app to demonstrate keeping state inside a docker-compose application
- Host: GitHub
- URL: https://github.com/binocarlos/moby-counter
- Owner: binocarlos
- License: mit
- Created: 2015-05-29T14:28:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-02-01T18:50:26.000Z (10 months ago)
- Last Synced: 2024-04-14T14:36:48.433Z (7 months ago)
- Language: JavaScript
- Size: 271 KB
- Stars: 6
- Watchers: 5
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## moby-counter
A simple app that is used to demonstrate keeping state inside a docker-compose app.
## run
```
$ docker-compose build
$ docker-compose up
```This will expose the web application on port 80.
## Database backends
There are two versions of the moby app - one that saves data to Redis and one that saves it to Postgres.
### Redis
The default is to use the Redis connection - the envrionment variables that control this:
* USE_REDIS_HOST
* USE_REDIS_PORT### Postgres
If any of the following variables are defined - it will force the app to use the Postgres backend:
* USE_POSTGRES_HOST
* USE_POSTGRES_PORT
* POSTGRES_USER
* POSTGRES_PASSWORD
## LicenseMIT