forked from PalisadoesFoundation/talawa-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue#974 in talawa-api (Docker for Easy Local Devlopment) (Palisadoe…
…sFoundation#1418) * feat: Dockerfile and docker-compose.yaml created * Added env vars to compose file and modified setup.ts for docker-compose * Added Docker Installation Steps to Documentation * Updated Table of Contents for INSTALLATION.md * docs: made a separate section for docker installation * refactor: Skips MonogoURL Setup if docker installation in setup.ts * refactor: Changed node:19 to node:lts in Dockerfile
- Loading branch information
1 parent
1b48583
commit b781dbe
Showing
4 changed files
with
96 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM node:lts | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY package*.json ./ | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
EXPOSE 4000 | ||
|
||
CMD ["npm", "run", "dev"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
services: | ||
mongodb: | ||
image: mongo:latest | ||
ports: | ||
- 27017:27017 | ||
volumes: | ||
- mongodb-data:/data/db | ||
|
||
redis-stack-server: | ||
image: redis/redis-stack-server:latest | ||
ports: | ||
- 6379:6379 | ||
volumes: | ||
- redis-data:/data/redis | ||
|
||
talawa-api-container: | ||
build: . | ||
ports: | ||
- 4000:4000 | ||
depends_on: | ||
- mongodb | ||
- redis-stack-server | ||
environment: | ||
- MONGO_DB_URL=mongodb://mongodb:27017 | ||
- REDIS_HOST=redis-stack-server | ||
- REDIS_PORT=6379 | ||
|
||
volumes: | ||
mongodb-data: | ||
redis-data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters