Skip to content

Commit

Permalink
added docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
jpopesculian committed Jan 2, 2019
1 parent 59ab930 commit 05a9afd
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist
node_modules
Dockerfile
docker-compose.yml
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@ USER rise

COPY --chown=rise . /home/rise/rise-node/
RUN npm run transpile
RUN rm -rf tests

CMD ["node", "app.js"]
COPY --chown=rise ./docker/mainnet_config.json /home/rise/config.json

CMD ["node", "dist/app.js", "-n", "mainnet", "-e", "/home/rise/config.json"]
37 changes: 37 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: "3"
services:

rise:
build: .
depends_on:
- redis
- postgres
ports:
- "127.0.0.1:5555:5555"
networks:
- overlay
restart: on-failure

redis:
image: redis:5-alpine
networks:
- overlay
restart: on-failure

postgres:
image: postgres:11-alpine
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: rise
POSTGRES_DB: rise_db
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- overlay
restart: on-failure

volumes:
postgres-data:

networks:
overlay:
21 changes: 21 additions & 0 deletions docker/mainnet_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"db": {
"host": "postgres",
"port": 5432,
"database": "rise_db",
"user": "rise",
"password": "password",
"poolSize": 95,
"poolIdleTimeout": 30000,
"reapIntervalMillis": 1000,
"logEvents": [
"error"
]
},
"redis": {
"host": "127.0.0.1",
"port": 6380,
"db": 0,
"password": null
}
}

0 comments on commit 05a9afd

Please sign in to comment.