From ba008f5b57ff2a60f80bb4019f6f7b83cc58549d Mon Sep 17 00:00:00 2001 From: Cyrille <1618640+cyri113@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:04:26 +0100 Subject: [PATCH 1/3] add discourse services --- development/.env.discourse.sample | 12 +++++++++ development/docker-compose.yml | 40 ++++++++++++++++++++++++++++++ development/redis/discourse.sample | 1 + 3 files changed, 53 insertions(+) create mode 100644 development/.env.discourse.sample create mode 100644 development/redis/discourse.sample diff --git a/development/.env.discourse.sample b/development/.env.discourse.sample new file mode 100644 index 0000000..2d269ec --- /dev/null +++ b/development/.env.discourse.sample @@ -0,0 +1,12 @@ +NODE_ENV=production +PORT=3000 + +NEO4J_HOST=neo4j +NEO4J_PORT=7687 +NEO4J_USERNAME=neo4j +NEO4J_PASSWORD=password + +REDIS_HOST=redis +REDIS_PORT=6379 + +PROXY_URI=http://xxxx:yyyy@eu.dc.smartproxy.com \ No newline at end of file diff --git a/development/docker-compose.yml b/development/docker-compose.yml index b056ced..1587201 100644 --- a/development/docker-compose.yml +++ b/development/docker-compose.yml @@ -344,6 +344,46 @@ services: # HIVEMIND SERVICES - END + # DISCOURSE SERVICES - START + + discourse-redis: + image: redis:7.0.11 + restart: unless-stopped + command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ] + volumes: + - type: bind + source: ./redis/discourse.conf + target: /usr/local/etc/redis/redis.conf + read_only: true + healthcheck: + test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] + interval: 60s + timeout: 10s + retries: 2 + start_period: 40s + networks: + - hivemind + - monitoring + <<: *logging + + discourse: + image: + command: yarn run start:prod + restart: always + ports: + - 43001:3000 + env_file: + - .env.discourse + depends_on: + discourse-redis: + condition: service_healthy + rabbitmq-dev: + condition: service_healthy + neo4j-dev: + condition: service_healthy + + # DISCOURSE SERVICES - END + volumes: mongodb_data_container: rmq_data_container: diff --git a/development/redis/discourse.sample b/development/redis/discourse.sample new file mode 100644 index 0000000..6356f6e --- /dev/null +++ b/development/redis/discourse.sample @@ -0,0 +1 @@ +requirepass PASSWORD From bf3eedbcbd38f7efb7aa67544ba4d3fdcb98d40c Mon Sep 17 00:00:00 2001 From: Cyrille <1618640+cyri113@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:16:07 +0100 Subject: [PATCH 2/3] add discourse iamge --- development/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/development/docker-compose.yml b/development/docker-compose.yml index 1587201..6d8f516 100644 --- a/development/docker-compose.yml +++ b/development/docker-compose.yml @@ -367,7 +367,7 @@ services: <<: *logging discourse: - image: + image: ghcr.io/togethercrew/discourse:main command: yarn run start:prod restart: always ports: From 2ac6c93b35af9cbb450af94d8c893d162c6036db Mon Sep 17 00:00:00 2001 From: Cyrille <1618640+cyri113@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:26:11 +0100 Subject: [PATCH 3/3] edit networks --- development/docker-compose.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/development/docker-compose.yml b/development/docker-compose.yml index 6d8f516..041239a 100644 --- a/development/docker-compose.yml +++ b/development/docker-compose.yml @@ -362,7 +362,7 @@ services: retries: 2 start_period: 40s networks: - - hivemind + - discourse - monitoring <<: *logging @@ -381,6 +381,11 @@ services: condition: service_healthy neo4j-dev: condition: service_healthy + networks: + - discourse + - development + - monitoring + <<: *logging # DISCOURSE SERVICES - END @@ -404,3 +409,5 @@ networks: external: true hivemind: driver: bridge + discourse: + driver: bridge \ No newline at end of file