Skip to content

Commit

Permalink
Update Python virtual environment path to /usr/local/bin/venv in Dock…
Browse files Browse the repository at this point in the history
…erfile and shell scripts.
  • Loading branch information
nsouto committed Aug 26, 2024
1 parent 9072f1e commit a2e7c2e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions postfix/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ RUN apt-get update; \
procmail \
sasl2-bin \
python3 \
python3-full \
python3-pip \
python3-venv \
supervisor \
Expand All @@ -61,8 +62,8 @@ RUN apt-get update; \
RUN apt-get install -yqq --no-install-recommends --no-install-suggests \
opendmarc

RUN python3 -m venv /root/venv; \
. /root/venv/bin/activate; \
RUN python3 -m venv /usr/local/bin/venv; \
. /usr/local/bin/venv/bin/activate; \
pip3 install --no-cache-dir envtpl awscli

RUN apt-get --quiet --quiet clean all \
Expand Down
2 changes: 1 addition & 1 deletion postfix/usr/local/bin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ EOF
chmod +r /usr/local/bin/.mailparse.env

echo "Create config file from template"
. /root/venv/bin/activate
. /usr/local/bin/venv/bin/activate
envtpl < /etc/pdns/recursor.conf.tpl > /etc/pdns/recursor.conf

echo "Create PowerDNS directories"
Expand Down
2 changes: 1 addition & 1 deletion postfix/usr/local/bin/mailparse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ rm -f "$TEMP_EMAIL_FILE"

# Function to send email to Kinesis
send_to_kinesis() {
. /root/venv/bin/activate;
. /usr/local/bin/venv/bin/activate;

if ! command -v aws &> /dev/null; then
echo "AWS CLI not found. Cannot send email to Kinesis."
Expand Down

0 comments on commit a2e7c2e

Please sign in to comment.