<commit_before>#!/usr/bin/env bash

# Exit if an error occurs
set -e

# Function to call for cleanup
acbuildend () { export EXT=$?; acbuild --debug end && exit $EXT; }

# Begin a new build
acbuild --debug begin

# When the script exits, call cleanup
trap acbuildend EXIT

# Add a dependency on the nginx image
acbuild --debug dep add aci.gonyeo.com/nginx

# Copy the site to nginx's serve location
acbuild --debug copy $1 /usr/share/nginx/html

# Add a port for the site to be hosted over
acbuild --debug port add http tcp 80

# Set the name of the image
acbuild --debug set-name "aci.gonyeo.com/blog"

# Exec nginx in the foreground
acbuild --debug set-exec -- "/usr/sbin/nginx" "-g" "daemon off;"

# Write the image
acbuild --debug write blog-latest-linux-amd64.aci<commit_msg>blog: add overwrite flag to write<commit_after>#!/usr/bin/env bash

# Exit if an error occurs
set -e

# Function to call for cleanup
acbuildend () { export EXT=$?; acbuild --debug end && exit $EXT; }

# Begin a new build
acbuild --debug begin

# When the script exits, call cleanup
trap acbuildend EXIT

# Add a dependency on the nginx image
acbuild --debug dep add aci.gonyeo.com/nginx

# Copy the site to nginx's serve location
acbuild --debug copy $1 /usr/share/nginx/html

# Add a port for the site to be hosted over
acbuild --debug port add http tcp 80

# Set the name of the image
acbuild --debug set-name "aci.gonyeo.com/blog"

# Exec nginx in the foreground
acbuild --debug set-exec -- "/usr/sbin/nginx" "-g" "daemon off;"

# Write the image
acbuild --debug write --overwrite blog-latest-linux-amd64.aci
{'fraction_non_alphanumeric': 0.10377358490566038, 'fraction_numerical': 0.006289308176100629, 'mean_word_length': 3.4565826330532214, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2925430', 'n_tokens_mistral': 551, 'n_tokens_neox': 525, 'n_words': 221}