Skip to content

Commit

Permalink
add specific workdir
Browse files Browse the repository at this point in the history
  • Loading branch information
masloffvs committed May 23, 2024
1 parent d3a62b4 commit 87562ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ RUN chmod +x /usr/local/bin/url_validate_and_trim.py
EXPOSE 80
EXPOSE 443

WORKDIR /usr/local/bin

# Start Nginx and monitoring script
CMD ["sh", "-c", "nginx && watch_routes.sh"]
4 changes: 2 additions & 2 deletions watch_routes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ generate_config() {
}

echo "Dynamic routing script started..."
python3 url_validate_and_trim.py
python3 /usr/local/bin/url_validate_and_trim.py

# Generate initial configuration
generate_config
Expand All @@ -66,6 +66,6 @@ generate_config
echo "Monitoring routes.trp for changes..."
while inotifywait -e modify /etc/nginx/routes.trp; do
echo "routes.trp has been modified. Regenerating Nginx configuration..."
python3 ./url_validate_and_trim.py
python3 /usr/local/bin/url_validate_and_trim.py
generate_config
done

0 comments on commit 87562ba

Please sign in to comment.