Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Commit

Permalink
feat(docker): Add docker-compose to handle all the docker containers
Browse files Browse the repository at this point in the history
  • Loading branch information
AjanShrestha committed Dec 24, 2019
1 parent d1fe296 commit c138dce
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
50 changes: 50 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
version: '3.7'
services:
client:
image: ajreddevil/client-job-board
restart: always
container_name: client
ports:
- '80:80'
links:
- api
depends_on:
- api
networks:
- webappnetwork
api:
image: ajreddevil/api-job-board
restart: always
container_name: api
ports:
- '5000:5000'
environment:
NODE_ENV: 'docker'
depends_on:
- redis
networks:
- webappnetwork
worker:
image: ajreddevil/worker-job-board
restart: always
container_name: worker
environment:
NODE_ENV: 'docker'
depends_on:
- redis
networks:
- webappnetwork
redis:
image: redis
restart: always
container_name: redis
volumes:
- ${PWD}/data:/data
ports:
- 6379:6379
command: redis-server --appendonly yes
networks:
- webappnetwork
networks:
webappnetwork:
driver: bridge
9 changes: 8 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,11 @@ start-redis:

stop-redis:
docker stop redis
docker rm redis
docker rm redis

# RUN cmd
run-job-board:
docker-compose -p job-board up -d

stop-job-board:
docker-compose -p job-board down

0 comments on commit c138dce

Please sign in to comment.