diff --git a/core.prod.yml b/core.prod.yml new file mode 100644 index 0000000..fae5757 --- /dev/null +++ b/core.prod.yml @@ -0,0 +1,45 @@ +version: "3.4" +services: + mongodb: + image: mongo:4.4 + volumes: + - botcoremongodata:/data/db + ports: + - "127.0.0.1:27017:27017" + healthcheck: + test: echo 'db.runCommand("ping").ok' | mongo 127.0.0.1:27017/test --quiet + interval: 10s + timeout: 10s + retries: 5 + start_period: 10s + + rabbitmq: + image: rabbitmq:3-management-alpine + volumes: + - botcorerabbitdata:/data/db + ports: + - "127.0.0.1:5672:5672" + - "127.0.0.1:15672:15672" + healthcheck: + test: [ "CMD", "nc", "-z", "127.0.0.1", "5672" ] + interval: 10s + timeout: 10s + retries: 5 + + codex-bot-core: + image: codexteamuser/codex-bot-core:stage + command: python main.py + restart: on-failure + env_file: + - .env + depends_on: + mongodb: + condition: service_healthy + rabbitmq: + condition: service_healthy + ports: + - "127.0.0.1:1337:1337" + +volumes: + botcoremongodata: + botcorerabbitdata: \ No newline at end of file diff --git a/core.yml b/core.yml index ed03e73..dc1c2ac 100644 --- a/core.yml +++ b/core.yml @@ -15,7 +15,8 @@ services: rabbitmq: image: rabbitmq:3-management-alpine - container_name: rabbitmq + volumes: + - botcorerabbitdata:/data/db ports: - "127.0.0.1:5672:5672" - "127.0.0.1:15672:15672" @@ -42,4 +43,5 @@ services: - "127.0.0.1:1337:1337" volumes: - botcoremongodata: \ No newline at end of file + botcoremongodata: + botcorerabbitdata: \ No newline at end of file