0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 18:07:17 +01:00

Improve docker-compose-config experience (#2266)

* Improve docker-compose-config experience

* Black

* Isort

* Don't look for a virtual env

* Use python3 -m pip instead of pip3 for consistency

* Black

* Add set -ex
This commit is contained in:
Michael Matloka 2020-11-20 16:11:05 +01:00 committed by GitHub
parent 84f494646a
commit 427d57141f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 3 deletions

14
docker-compose-config.py Executable file → Normal file
View File

@ -2,8 +2,13 @@ import secrets
import string
from typing import Optional
import yaml
from yaml.loader import FullLoader
try:
import yaml
from yaml.loader import FullLoader
except ImportError:
raise ImportError(
"Missing pyyaml! Install it with command `python3 -m pip install pyyaml` to run this configurator."
)
FILE_PATH = "docker-compose.yml"
@ -76,4 +81,7 @@ def main():
if __name__ == "__main__":
main()
try:
main()
except KeyboardInterrupt:
print("\nConfiguration canceled.")

6
docker-compose-config.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
set -ex
python3 -m pip install pyyaml
echo
python3 docker-compose-config.py