mirror of
https://github.com/anyproto/any-sync-dockercompose.git
synced 2025-06-08 05:47:03 +09:00
Merge pull request #93 from anyproto/92-self-host-error
renamed .env.common -> .env.default
This commit is contained in:
commit
d5eadd6073
3 changed files with 20 additions and 3 deletions
|
@ -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_ACCESS_KEY_ID=minio_access_key
|
||||||
AWS_SECRET_ACCESS_KEY=minio_secret_key
|
AWS_SECRET_ACCESS_KEY=minio_secret_key
|
||||||
MINIO_BUCKET=minio-bucket
|
MINIO_BUCKET=minio-bucket
|
|
@ -25,7 +25,14 @@ To get started, follow these steps:
|
||||||
```
|
```
|
||||||
3. **Install the necessary dependencies:**
|
3. **Install the necessary dependencies:**
|
||||||
You need to install Docker and Docker Compose https://docs.docker.com/compose/install/
|
You need to install Docker and Docker Compose https://docs.docker.com/compose/install/
|
||||||
4. **Run the project:**
|
4. **Configuration:**
|
||||||
|
For configuration, use the `.env.override` file.
|
||||||
|
For example, setting an external IP for listening:
|
||||||
|
```
|
||||||
|
echo 'EXTERNAL_LISTEN_HOSTS=<yourExternalIp1> <yourExternalIp2' >> .env.override
|
||||||
|
```
|
||||||
|
More information can be found [here](../../wiki/Configuration).
|
||||||
|
5. **Run the project:**
|
||||||
```bash
|
```bash
|
||||||
make start
|
make start
|
||||||
```
|
```
|
||||||
|
|
|
@ -7,7 +7,7 @@ import requests
|
||||||
import re
|
import re
|
||||||
|
|
||||||
cfg = {
|
cfg = {
|
||||||
'inputFile': '.env.common',
|
'inputFile': '.env.default',
|
||||||
'overrideFile': '.env.override',
|
'overrideFile': '.env.override',
|
||||||
'outputFile': '.env',
|
'outputFile': '.env',
|
||||||
'overrideVarMap': {
|
'overrideVarMap': {
|
||||||
|
@ -20,6 +20,11 @@ cfg = {
|
||||||
'prod': 'https://puppetdoc.anytype.io/api/v1/prod-any-sync-compatible-versions/',
|
'prod': 'https://puppetdoc.anytype.io/api/v1/prod-any-sync-compatible-versions/',
|
||||||
'stage1': 'https://puppetdoc.anytype.io/api/v1/stage1-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
|
# load variables from inputFile
|
||||||
|
@ -78,5 +83,6 @@ for key,value in envVars.items():
|
||||||
|
|
||||||
# save in output file
|
# save in output file
|
||||||
with open(cfg['outputFile'], 'w') as file:
|
with open(cfg['outputFile'], 'w') as file:
|
||||||
|
file.write(cfg['outputFileHeader'])
|
||||||
for key, value in envVars.items():
|
for key, value in envVars.items():
|
||||||
file.write(f"{key}={value}\n")
|
file.write(f"{key}={value}\n")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue