Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #28 from derogab/dev
Browse files Browse the repository at this point in the history
Minor improve docker support
  • Loading branch information
derogab authored Mar 5, 2020
2 parents 74fe1cd + f634fdc commit 165ecd0
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 10 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
REACT_APP_DAEMON_SOCKET_URL=http://localhost
REACT_APP_DAEMON_SOCKET_PORT=8081
1 change: 0 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
github: derogab
patreon: derogab
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Coingraph is a **real-time graph for cryptocurrencies**.

![header](./assets/header.png)
![](./assets/header.png)

## Dependencies
```shell
Expand All @@ -28,9 +28,14 @@ yarn run all
The previous command starts both the [daemon](./daemon) and the web interface.

## Docker

[![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/derogab/coingraph?include_prereleases&style=flat-square)](https://github.com/derogab/coingraph/releases)
[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/derogab/coingraph-client/latest?style=flat-square)](https://hub.docker.com/r/derogab/coingraph-client)
[![Docker Pulls](https://img.shields.io/docker/pulls/derogab/coingraph-client?style=flat-square)](https://hub.docker.com/r/derogab/coingraph-client)

#### Manual
1. [Start the `coingraph-daemon`](./daemon/README.md#start-container) and then
2.
2. Run the container
```shell
docker run -d \
-p 3000:3000 \
Expand All @@ -39,12 +44,10 @@ The previous command starts both the [daemon](./daemon) and the web interface.
```

#### Using `docker-compose`
Open `docker-compose.yml` and eventually change environment variables.

And then
Open `docker-compose.yml` and eventually change environment variables. And then
```shell
docker-compose up -d --build
```

## License
_Coingraph_ is made with ♥ by [derogab](https://github.com/derogab) and the [amazing dev team](https://github.com/derogab/coingraph/graphs/contributors). It is released under the MIT license.
[_Coingraph_](https://github.com/derogab/coingraph) is made with ♥ by [derogab](https://github.com/derogab) and the [amazing dev team](https://github.com/derogab/coingraph/graphs/contributors). It is released under the MIT license.
5 changes: 5 additions & 0 deletions daemon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ node app.js \
Info: custom params overwrite default preferences in `.env`.

## Docker

[![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/derogab/coingraph?include_prereleases&style=flat-square)](https://github.com/derogab/coingraph/releases)
[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/derogab/coingraph-daemon/latest?style=flat-square)](https://hub.docker.com/r/derogab/coingraph-daemon)
[![Docker Pulls](https://img.shields.io/docker/pulls/derogab/coingraph-daemon?style=flat-square)](https://hub.docker.com/r/derogab/coingraph-daemon)

###### Build image from source
```shell
docker build -t derogab/coingraph-daemon .
Expand Down
2 changes: 1 addition & 1 deletion daemon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "coingraph-daemon",
"version": "1.0.2",
"version": "1.1.0",
"description": "A daemon for coingraph",
"main": "app.js",
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ services:
ports:
- '3000:3000'
environment:
- REACT_APP_DAEMON_SOCKET_URL=http://localhost
- REACT_APP_DAEMON_SOCKET_PORT=8081
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "coingraph",
"version": "1.0.2",
"version": "1.1.0",
"private": true,
"dependencies": {
"axios": "^0.19.0",
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import * as serviceWorker from './serviceWorker';

dotenv.config();

const SOCKET_URL = process.env.REACT_APP_DAEMON_SOCKET_URL || 'http://localhost';
const SOCKET_PORT = process.env.REACT_APP_DAEMON_SOCKET_PORT || 8081;
const socketIo = io(`http://localhost:${SOCKET_PORT}`);
const socketIo = io(`${SOCKET_URL}:${SOCKET_PORT}`);

ReactDOM.render(<App socket={socketIo} />, document.getElementById('root'));

Expand Down

0 comments on commit 165ecd0

Please sign in to comment.