Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ else

invoke statics
invoke loadthesauri
invoke cleanup

echo "Executing UWSGI server $cmd for Production"
fi
Expand Down
15 changes: 15 additions & 0 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,21 @@ def initialized(ctx):
ctx.run(f"date > {lockfile}")


@task
def cleanup(ctx):
"""Remove the temporary fixture files from the shared /tmp volume once they have been loaded."""
print("**************************cleanup fixtures*************************")
for path in [
"/tmp/default_oauth_apps_docker.json",
"/tmp/default_site.json",
"/tmp/django_admin_docker.json",
]:
try:
os.remove(path)
except OSError:
pass


def _docker_host_ip():
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
Expand Down
Loading