Skip to content

Commit

Permalink
fix: docker-compose.example.yml updated
Browse files Browse the repository at this point in the history
  • Loading branch information
scientiststwin committed Nov 21, 2023
1 parent 6ceee73 commit 584459b
Showing 1 changed file with 124 additions and 0 deletions.
124 changes: 124 additions & 0 deletions docker-compose.example.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,138 @@
version: "3.9"

services:

server:
build:
context: .
target: prod
dockerfile: Dockerfile
networks:
- app_network
environment:
PORT: 3000
RABBIT_HOST: rabbitmq
RABBIT_PORT: 5672
RABBIT_USER: root
RABBIT_PASSWORD: pass
NEO4J_PROTOCOL: bolt
NEO4J_HOST: neo4j
NEO4J_PORT: 7687
NEO4J_USER: neo4j
NEO4J_PASSWORD: password
MONGODB_HOST: mongo
MONGODB_PORT: 27017
MONGODB_USER: root
MONGODB_PASS: pass
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: password
SAGA_DB_NAME: Saga
SAGA_DB_COLLECTION: saga
SENTRY_DSN: sample_dsn
SENTRY_ENV: local
depends_on:
redis:
condition: service_healthy
mongo:
condition: service_healthy
neo4j:
condition: service_healthy
rabbitmq:
condition: service_healthy

worker:
build:
context: .
target: prod
dockerfile: Dockerfile
command: python3 worker.py
networks:
- app_network
environment:
PORT: 3000
RABBIT_HOST: rabbitmq
RABBIT_PORT: 5672
RABBIT_USER: root
RABBIT_PASSWORD: pass
NEO4J_PROTOCOL: bolt
NEO4J_HOST: neo4j
NEO4J_PORT: 7687
NEO4J_USER: neo4j
NEO4J_PASSWORD: password
MONGODB_HOST: mongo
MONGODB_PORT: 27017
MONGODB_USER: root
MONGODB_PASS: pass
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: password
SAGA_DB_NAME: Saga
SAGA_DB_COLLECTION: saga
SENTRY_DSN: sample_dsn
SENTRY_ENV: local
depends_on:
redis:
condition: service_healthy
mongo:
condition: service_healthy
neo4j:
condition: service_healthy
rabbitmq:
condition: service_healthy

redis:
image: "redis:7.0.12-alpine"
command: redis-server --requirepass password
networks:
- app_network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3

mongo:
image: "mongo:6.0.8"
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=pass
healthcheck:
test: echo 'db.stats().ok' | mongosh localhost:27017/test --quiet
interval: 60s
timeout: 10s
retries: 2
start_period: 40s
networks:
- app_network

neo4j:
image: "neo4j:5.9.0"
networks:
- app_network
environment:
- NEO4J_AUTH=neo4j/password
- NEO4J_PLUGINS=["apoc", "graph-data-science"]
- NEO4J_dbms_security_procedures_unrestricted=apoc.*,gds.*
healthcheck:
test: ["CMD-SHELL", "neo4j status"]
interval: 10s
timeout: 10s
retries: 3

rabbitmq:
image: "rabbitmq:3-management-alpine"
environment:
RABBITMQ_DEFAULT_USER: root
RABBITMQ_DEFAULT_PASS: pass
networks:
- app_network
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 10s
timeout: 10s
retries: 3

networks:
app_network:
driver: bridge

0 comments on commit 584459b

Please sign in to comment.