Skip to content

Commit

Permalink
Merge pull request #3401 from AlexsLemonade/ark/update-scripts
Browse files Browse the repository at this point in the history
Update scripts: set platform and system version
  • Loading branch information
arkid15r authored Oct 6, 2023
2 parents 7ab86ce + e7acc18 commit 1369e34
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion api/serve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ docker run \
--add-host=elasticsearch:"$ES_HOST_IP" \
--env-file api/environments/local \
--interactive \
--platform linux/amd64 \
--publish 8000:8000 \
--tty \
"$DOCKERHUB_REPO/dr_api_local" \
"$DOCKERHUB_REPO/dr_api_local:$SYSTEM_VERSION" \
python3 manage.py runserver 0.0.0.0:8000 "$@"
1 change: 1 addition & 0 deletions api/serve_production.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ docker run \
--env-file api/environments/local \
--interactive \
--link drdb:postgres \
--platform linux/amd64 \
--publish 8081:8081 \
--tty \
--volume "$STATIC_VOLUMES":/tmp/www/static \
Expand Down
1 change: 1 addition & 0 deletions foreman/test_survey.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ docker run \
--env SURVEYOR="$SURVEYOR" \
--env-file foreman/environments/test \
--interactive \
--platform linux/amd64 \
--tty \
--volume "$volume_directory":/home/user/data_store \
"$DOCKERHUB_REPO/dr_foreman" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@ docker run \
--log-opt awslogs-region="${region}" \
--log-opt awslogs-stream="${log_stream}" \
--name dr_api \
--platform linux/amd64 \
--publish 8081:8081 \
--tty \
--volume "$STATIC_VOLUMES":/tmp/www/static \
--publish 8081:8081 \
"${dockerhub_repo}/${api_docker_image}" \
/bin/sh -c "/home/user/collect_and_run_uwsgi.sh"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ docker run \\
--log-opt awslogs-region="${region}" \\
--log-opt awslogs-stream="log-stream-foreman-${user}-${stage}" \\
--name dr_foreman \\
--platform linux/amd64 \\
--tty \\
--volume /tmp:/tmp \\
"${dockerhub_repo}/${foreman_docker_image}" \\
Expand All @@ -64,6 +65,7 @@ docker run \\
--env DATABASE_USER=${database_user} \\
--env-file /home/ubuntu/environment \\
--interactive \\
--platform linux/amd64 \\
--tty \\
--volume /tmp:/tmp \\
${dockerhub_repo}/${foreman_docker_image} \\
Expand All @@ -84,6 +86,7 @@ docker run \\
--env DATABASE_USER=${database_user} \\
--env-file /home/ubuntu/environment \\
--interactive \\
--platform linux/amd64 \\
--tty \\
--volume /tmp:/tmp \\
${dockerhub_repo}/dr_\"\$1\" \\
Expand Down Expand Up @@ -145,6 +148,7 @@ docker run \
--log-opt awslogs-region="${region}" \
--log-opt awslogs-stream="log-stream-foreman-${user}-${stage}" \
--name job_filler \
--platform linux/amd64 \
--tty \
--volume /tmp:/tmp \
"${dockerhub_repo}/${foreman_docker_image}" \
Expand Down
3 changes: 3 additions & 0 deletions scripts/run_shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ fi
chmod -R a+rwX "$volume_directory"

docker build \
--build-arg DOCKERHUB_REPO="$DOCKERHUB_REPO" \
--build-arg SYSTEM_VERSION="$SYSTEM_VERSION" \
--file foreman/dockerfiles/Dockerfile.foreman \
--tag dr_shell \
.
Expand All @@ -44,6 +46,7 @@ docker run \
--env AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" \
--env-file foreman/environments/local \
--interactive \
--platform linux/amd64 \
--tty \
--volume "$volume_directory":/home/user/data_store \
--volume /tmp:/tmp \
Expand Down
1 change: 1 addition & 0 deletions workers/run_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ docker run \
--env-file workers/environments/local \
--interactive \
--link drdb:postgres \
--platform linux/amd64 \
--tty \
--volume "$volume_directory":/home/user/data_store \
"$DOCKERHUB_REPO/dr_$IMAGE" \
Expand Down
1 change: 1 addition & 0 deletions workers/run_janitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ docker run \
--interactive \
--link drdb:postgres \
--memory 500m \
--platform linux/amd64 \
--tty \
--volume "$script_directory/volume":/home/user/data_store \
"$DOCKERHUB_REPO/dr_smasher" \
Expand Down

0 comments on commit 1369e34

Please sign in to comment.