diff --git a/Dockerfile b/Dockerfile index c8d1845..264e7d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # ---------- Dockerfile ---------- -# Base image – PHP + Apache +# Base image - PHP + Apache FROM php:apache # Install Python, NGINX, Supervisor and pip @@ -26,7 +26,7 @@ COPY apache_vhost.conf /etc/apache2/sites-available/000-default.conf COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Expose the ports you care about -EXPOSE 80 +EXPOSE 80, 8080, 5000 # Start Supervisor CMD ["/usr/bin/supervisord", "-n"] \ No newline at end of file diff --git a/api/app.py b/api/app.py index b5449b0..1223f1b 100644 --- a/api/app.py +++ b/api/app.py @@ -15,8 +15,6 @@ import json, time, hashlib words = [] simple_words = [] -HASH_DIR = Path("/opt/pwdgen") -HASH_FILE = HASH_DIR / "hash_record.txt" password_hashes =set() SPECIAL_SET = "!@#$%^&*(),.<>?~`;:|][}{=-+_" WORDS_FILE = "dict.yaml" @@ -29,6 +27,7 @@ password_types = [ ################################################# # Hash Record Functions ################################################# +HASH_FILE = Path("/opt/pwdgen/hash_record.txt") # Create the file if it doesn’t exist if not HASH_FILE.exists(): HASH_FILE.touch(exist_ok=True)