Skip to content

Commit

Permalink
fixed docker-compose.dev.yaml & separated docker-compose.cloud.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
abhayymishraa committed Nov 9, 2024
1 parent bba5d82 commit 37b6eae
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 16 deletions.
74 changes: 74 additions & 0 deletions docker-compose.cloud.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
version: "3.8"

services:
mongodb:
image: mongo:latest
ports:
- 27017:27017
volumes:
- mongodb-data:/data/db
networks:
- talawa-network

redis-stack-server:
image: redis/redis-stack-server:latest
ports:
- 6379:6379
volumes:
- redis-data:/data/redis
networks:
- talawa-network

minio:
image: minio/minio
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
command: server /data --console-address ":9001"
volumes:
- minio-data:/data
networks:
- talawa-network

talawa-api-dev:
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
depends_on:
- mongodb
- redis-stack-server
- minio
environment:
- MONGO_DB_URL=mongodb://mongodb:27017/talawa-api
- REDIS_HOST=redis-stack-server
- REDIS_PORT=6379

caddy:
image: caddy/caddy:2.2.1-alpine
container_name: caddy-service
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
- $PWD/site:/srv
- caddy_data:/data
- caddy_config:/config

volumes:
mongodb-data:
redis-data:
caddy_data:
caddy_config:
minio-data:

networks:
talawa-network:
driver: bridge
22 changes: 6 additions & 16 deletions docker-compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ services:
build:
context: .
dockerfile: Dockerfile.dev
container_name: talawa-api-dev
ports:
- "4000:4000"
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
Expand All @@ -45,28 +48,15 @@ services:
- redis-stack-server
- minio
environment:
- MONGO_DB_URL=mongodb://mongodb:27017
- MONGO_DB_URL=mongodb://mongodb:27017/talawa-api
- REDIS_HOST=redis-stack-server
- REDIS_PORT=6379

caddy:
image: caddy/caddy:2.2.1-alpine
container_name: caddy-service
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
- $PWD/site:/srv
- caddy_data:/data
- caddy_config:/config
networks:
- talawa-network

volumes:
mongodb-data:
redis-data:
caddy_data:
caddy_config:
minio-data:

networks:
Expand Down

0 comments on commit 37b6eae

Please sign in to comment.