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:
parent
84f494646a
commit
427d57141f
14
docker-compose-config.py
Executable file → Normal file
14
docker-compose-config.py
Executable file → Normal 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
6
docker-compose-config.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
python3 -m pip install pyyaml
|
||||
echo
|
||||
python3 docker-compose-config.py
|
Loading…
Reference in New Issue
Block a user