Skip to content

Commit

Permalink
docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
tugrul committed Mar 7, 2021
1 parent 56d0889 commit 5981a60
Show file tree
Hide file tree
Showing 8 changed files with 400 additions and 374 deletions.
11 changes: 7 additions & 4 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
DO_API_TOKEN=
ADMIN_TOKEN=
ROOT_DOMAIN=example.com
SUB_DOMAIN_TTL=3600
DO_API_TOKEN=
ADMIN_TOKEN=
ROOT_DOMAIN=example.com
SUB_DOMAIN_TTL=3600
APP_PORT=3000
NODE_ENV=production
REDIS_URL=redis://db
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/node_modules/
/node_modules/
/data/dump.rdb
.env
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM node:14
WORKDIR '/usr/src/app'
Empty file added data/.gitignore
Empty file.
20 changes: 20 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

redis:
image: redis
container_name: db
volumes:
- ./data:/data
expose:
- 6379

app:
links:
- redis
build: ./
volumes:
- ./:/usr/src/app
ports:
- 3000:3000
env_file: .env
command:
sh -c 'yarn install && node index.js'
Loading

0 comments on commit 5981a60

Please sign in to comment.