From c3ddeb5631c2761fbe31420bc77d57d426c8c390 Mon Sep 17 00:00:00 2001 From: Grigory Efimov Date: Wed, 21 Aug 2024 16:32:42 -0300 Subject: [PATCH 1/4] renamed .env.common -> .env.default added headers in .env.default and edited README.md --- .env.common => .env.default | 6 +++++- README.md | 7 +++++++ docker-generateconfig/env.py | 8 +++++++- 3 files changed, 19 insertions(+), 2 deletions(-) rename .env.common => .env.default (92%) diff --git a/.env.common b/.env.default similarity index 92% rename from .env.common rename to .env.default index 26ee600..564af13 100644 --- a/.env.common +++ b/.env.default @@ -1,3 +1,7 @@ +# !!! PLEASE DO NOT EDIT THIS FILE !!! +# To make changes to the '.env', use the '.env.override' file +# https://github.com/anyproto/any-sync-dockercompose/wiki/Configuration + AWS_ACCESS_KEY_ID=minio_access_key AWS_SECRET_ACCESS_KEY=minio_secret_key MINIO_BUCKET=minio-bucket @@ -14,7 +18,7 @@ ANY_SYNC_TOOLS_VERSION=latest MONGO_VERSION=7.0.2 REDIS_VERSION=7.2.0-v6 -MINIO_VERSION=RELEASE.2024-07-04T14-25-45Z +MINIO_VERSION=RELEASE.2024-07-04T14-25-45Z EXTERNAL_LISTEN_HOST="127.0.0.1" #EXTERNAL_LISTEN_HOSTS="192.168.1.2 10.0.0.2" diff --git a/README.md b/README.md index 42c3215..90f2396 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,13 @@ To get started, follow these steps: ``` 3. **Install the necessary dependencies:** You need to install Docker and Docker Compose https://docs.docker.com/compose/install/ +4. **Configuration:** + For configuration, use the `.env.override` file. + For example, setting an external IP for listening: + ``` + echo 'EXTERNAL_LISTEN_HOSTS= > .env.override + ``` + More information can be found [here](../../wiki/Configuration). 4. **Run the project:** ```bash make start diff --git a/docker-generateconfig/env.py b/docker-generateconfig/env.py index e7fbbf7..76b8503 100755 --- a/docker-generateconfig/env.py +++ b/docker-generateconfig/env.py @@ -7,7 +7,7 @@ import requests import re cfg = { - 'inputFile': '.env.common', + 'inputFile': '.env.default', 'overrideFile': '.env.override', 'outputFile': '.env', 'overrideVarMap': { @@ -20,6 +20,11 @@ cfg = { 'prod': 'https://puppetdoc.anytype.io/api/v1/prod-any-sync-compatible-versions/', 'stage1': 'https://puppetdoc.anytype.io/api/v1/stage1-any-sync-compatible-versions/', }, + 'outputFileHeader': '''# !!! PLEASE DO NOT EDIT THIS FILE !!! +# To make changes to the '.env', use the '.env.override' file +# https://github.com/anyproto/any-sync-dockercompose/wiki/Configuration + +''', } # load variables from inputFile @@ -78,5 +83,6 @@ for key,value in envVars.items(): # save in output file with open(cfg['outputFile'], 'w') as file: + file.write(cfg['outputFileHeader']) for key, value in envVars.items(): file.write(f"{key}={value}\n") From 22fa2efb0eb7576b7c0c3da8771d3dc7dd7c02c6 Mon Sep 17 00:00:00 2001 From: Grigory Efimov Date: Wed, 21 Aug 2024 16:38:47 -0300 Subject: [PATCH 2/4] README.md fixed --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 90f2396..d94da72 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ To get started, follow these steps: echo 'EXTERNAL_LISTEN_HOSTS= > .env.override ``` More information can be found [here](../../wiki/Configuration). -4. **Run the project:** +5. **Run the project:** ```bash make start ``` From c3e05d1684a515838869cd2847b278d12e7e78e5 Mon Sep 17 00:00:00 2001 From: Grigory Efimov Date: Wed, 21 Aug 2024 16:42:21 -0300 Subject: [PATCH 3/4] README.md fixed --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d94da72..f7622f3 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ To get started, follow these steps: ``` 3. **Install the necessary dependencies:** You need to install Docker and Docker Compose https://docs.docker.com/compose/install/ -4. **Configuration:** +4. **Configuration:** For configuration, use the `.env.override` file. For example, setting an external IP for listening: ``` From 85c5d6b3b74dca6892f8674e22af4c21c4b6fa6d Mon Sep 17 00:00:00 2001 From: Grigory Efimov Date: Wed, 21 Aug 2024 16:43:38 -0300 Subject: [PATCH 4/4] README.md fixed --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f7622f3..408bc50 100644 --- a/README.md +++ b/README.md @@ -15,20 +15,20 @@ Please visit the Wiki for comprehensive guides, installation instructions and mo ## Getting Started To get started, follow these steps: -1. **Clone the repository:** +1. **Install the necessary dependencies:** + You need to install Docker and Docker Compose https://docs.docker.com/compose/install/ +2. **Clone the repository:** ```bash git clone https://github.com/anyproto/any-sync-dockercompose.git ``` -2. **Navigate to the project directory:** +3. **Navigate to the project directory:** ```bash cd any-sync-dockercompose ``` -3. **Install the necessary dependencies:** - You need to install Docker and Docker Compose https://docs.docker.com/compose/install/ 4. **Configuration:** - For configuration, use the `.env.override` file. + For configuration, use the `.env.override` file. For example, setting an external IP for listening: - ``` + ```bash echo 'EXTERNAL_LISTEN_HOSTS= > .env.override ``` More information can be found [here](../../wiki/Configuration).