Skip to content

Commit

Permalink
fixed linting pt.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AntFMoJ committed Apr 16, 2024
1 parent ab89853 commit 1ddf08c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# checkov:skip=CKV_DOCKER_2:Healthcheck instructions have not been added to container images
# hadolint global ignore=DL3008

ARG r=4.3.2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

This repository is managed in Terraform [here](https://github.com/ministryofjustice/data-platform-github-access/blob/main/terraform/github/analytical-platform-repositories.tf).

This source had no README.
This source had no README.
9 changes: 6 additions & 3 deletions gather_env_vars.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import os
import os # pylint: disable=missing-module-docstring

R_ENV_FILE_NAME = "/srv/shiny-server/.Renviron"
R_ENV_FILE_NAME1 = "/home/shiny/.Renviron"


def gather_env_vars_to_renv_file():
with open(R_ENV_FILE_NAME, "a") as file_handler:
"""
Writes RENV files out.
"""
with open(R_ENV_FILE_NAME, "a") as file_handler: # pylint: disable=unspecified-encoding
for name, value in os.environ.items():
file_handler.write(f'{name}="{value}"')
file_handler.write("\n")

with open(R_ENV_FILE_NAME1, "a") as file_handler:
with open(R_ENV_FILE_NAME1, "a") as file_handler: # pylint: disable=unspecified-encoding
for name, value in os.environ.items():
file_handler.write(f'{name}="{value}"')
file_handler.write("\n")
Expand Down
7 changes: 3 additions & 4 deletions shiny-server.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
mkdir -p /var/log/shiny-server
chown shiny.shiny /var/log/shiny-server

if [ "$APPLICATION_LOGS_TO_STDOUT" != "false" ];
then
# push the "real" application logs to stdout with xtail in detached mode
exec xtail /var/log/shiny-server/ &
if [ "$APPLICATION_LOGS_TO_STDOUT" != "false" ]; then
# push the "real" application logs to stdout with xtail in detached mode
exec xtail /var/log/shiny-server/ &
fi

python3 ./gather_env_vars.py
Expand Down

0 comments on commit 1ddf08c

Please sign in to comment.