Skip to content

Commit

Permalink
Updates networking
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmerfield committed Jan 28, 2025
1 parent 6c60fed commit 098c058
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ FROM source AS prod
# build the brochure static site and exit (i.e. dont watch for changes)
RUN node ./app/documentation/build/index.js --no-watch

HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD curl --fail http://localhost:8080/health || exit 1

# Ensure the logfile directory exists with proper permissions
RUN mkdir -p /usr/src/app/data/logs/docker && chmod -R 0755 /usr/src/app/data/logs/docker

Expand Down
7 changes: 6 additions & 1 deletion scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,17 @@ GREEN_CONTAINER_PORT=8089
BLOT_USER=1000:1000

# Define the docker run command template with placeholders
# HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
# CMD curl --fail http://localhost:8080/health || exit 1
DOCKER_RUN_COMMAND="docker run --pull=always -d \
--user $BLOT_USER \
--name {{CONTAINER_NAME}} \
-p {{CONTAINER_PORT}}:8080 \
--network host \
--health-cmd 'curl --fail http://localhost:{{CONTAINER_PORT}}/health || exit 1' \
--health-interval=30s --health-timeout=5s --health-start-period=5s --health-retries=3 \
--env-file /etc/blot/secrets.env \
-e CONTAINER_NAME={{CONTAINER_NAME}} \
-e BLOT_PORT={{CONTAINER_PORT}} \
-v /var/www/blot/data:/usr/src/app/data \
--restart unless-stopped \
--memory=2g --cpus=1.5 \
Expand Down

0 comments on commit 098c058

Please sign in to comment.