Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge request #14

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ months data into new files so you can forecast payments as well.
* Aggregations are run on the data once a month
* Explained more [here](https://github.com/khaliqgant/finance-app/tree/master/elasticsearch)

# Docker
* A simplified Docker build has been added for those who are not in the depth with Docker builds
* Also a example [docker-compose.yml](https://github.com/stroskler/finance-app/tree/master/infrastructure/docker/simplified/docker-compose.yml) file has been added for simple use.



# Development
* Any pull requests are welcomed and encouraged!
Expand All @@ -66,6 +71,7 @@ You can generate such a file [here](http://www.htaccesstools.com/htpasswd-genera
* https://github.com/plaid/plaid-node
* Use graphs to show changes over time
* Need task runner commands to automate the browersify and npm-css process
* Fix Image on Dockerhub

## Notes
* Icons used are http://fortawesome.github.io/Font-Awesome/icons/
Expand Down
Binary file modified config.json
Binary file not shown.
27 changes: 27 additions & 0 deletions infrastructure/docker/simplified/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM node:14

# install git and nodemon
RUN apt-get update && \
apt-get install git && \
npm install -g nodemon

# fetch latest $state
WORKDIR /usr/share/
RUN git clone https://github.com/stroskler/finance-app.git

# install npm requirements
WORKDIR /usr/share/finance-app/
RUN npm install && \
chmod +x entrypoint.sh

# start command
CMD ["/bin/bash", "/usr/share/finance-app/infrastructure/docker/simplified/entrypoint.sh"]

# port used by http
EXPOSE 3000

# adding volume to pass-through config
VOLUME ["/usr/share/finance-app"]
VOLUME ["/usr/share/finance-app/data"]

HEALTHCHECK --interval=15s --timeout=10s CMD curl -f http://localhost || exit 1
11 changes: 11 additions & 0 deletions infrastructure/docker/simplified/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3"
services:
finance:
image: finance
container_name: finance
volumes:
- ./config.json:/usr/share/finance-app/config.json
- data/:/usr/share/finance-app/data/
ports:
- 3000:3000
restart: always
3 changes: 3 additions & 0 deletions infrastructure/docker/simplified/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
cd /usr/share/finance-app/ && \
nodemon server.js
Loading