Skip to content

Commit 3b35e40

Browse files
authored
Merge pull request #4 from geniusdynamics/dev
Update Application Version and fix bad gateway errors
2 parents 6d5d985 + 4655d72 commit 3b35e40

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

build-images.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ images=()
1414
repobase="${REPOBASE:-ghcr.io/geniusdynamics}"
1515
# Configure the image name
1616
reponame="passwordpusher"
17-
password_pusher_version="1.62"
17+
password_pusher_version="1.65"
1818
# Create a new empty container image
1919
container=$(buildah from scratch)
2020

imageroot/actions/create-module/10configure_environment_vars

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,33 @@ data = json.load(sys.stdin)
1616

1717
# Generate Password
1818

19+
1920
def generate_random_password(length):
2021
# Generate random bytes and convert them to a hexadecimal string
2122
random_bytes = os.urandom(length)
2223
password = random_bytes.hex()
2324
return password[:length]
2425

25-
#This is specific to you module, so you need to change it accordingly.
26+
27+
# This is specific to you module, so you need to change it accordingly.
2628

2729
# configure postgres db variables
28-
POSTGRES_USER="postgres"
29-
POSTGRES_PASSWORD=generate_random_password(16)
30-
POSTGRES_DB="passwordpusher"
30+
POSTGRES_USER = "postgres"
31+
POSTGRES_PASSWORD = generate_random_password(16)
32+
POSTGRES_DB = "passwordpusher"
3133
postgres_config = {
3234
"POSTGRES_USER": POSTGRES_USER,
3335
"POSTGRES_PASSWORD": POSTGRES_PASSWORD,
34-
"POSTGRES_DB": POSTGRES_DB
36+
"POSTGRES_DB": POSTGRES_DB,
3537
}
3638
agent.write_envfile("database.env", postgres_config)
3739
# DATABASE_URL: 'postgres://passwordpusher_user:passwordpusher_passwd@postgres:5432/passwordpusher_db'
38-
DATABASE_URL = f"postgres://{POSTGRES_USER}:{POSTGRES_PASSWORD}@postgresql-app:5432/{POSTGRES_DB}"
40+
DATABASE_URL = (
41+
f"postgres://{POSTGRES_USER}:{POSTGRES_PASSWORD}@postgresql-app:5432/{POSTGRES_DB}"
42+
)
3943
database_url_config = {
40-
"DATABASE_URL": DATABASE_URL
44+
"DATABASE_URL": DATABASE_URL,
45+
"SECRET_KEY_BASE": generate_random_password(64),
4146
}
4247
agent.write_envfile("database-url.env", database_url_config)
43-
#agent.dump_env()
48+
# agent.dump_env()

imageroot/systemd/user/passwordpusher-app.service

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ ExecStart=/usr/bin/podman run --conmon-pidfile %t/passwordpusher-app.pid \
2323
--pod-id-file %t/passwordpusher.pod-id --replace -d --name passwordpusher-app \
2424
--env-file=%S/state/database-url.env \
2525
--env-file=%S/state/password-pusher.env \
26+
--env=HTTP_PORT=8080 \
27+
--env=HTTPS_PORT=8443 \
2628
--volume passwordpusher-app:/app:Z \
2729
${PWPUSH_IMAGE}
2830
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/passwordpusher-app.ctr-id -t 10

0 commit comments

Comments
 (0)