#!/bin/bash

export SERVER_LISTEN_ADDR="127.0.0.1"
export SERVER_LISTEN_PORT="8088"
export SERVER_WORKER_THREADS="10"

export API_ACCESS_TOKEN="magmatic-handyman-confirm-cauldron"

export DOCKER_UNIX_SOCKET_PATH="/Users/pii/Library/Containers/com.docker.docker/Data/docker.raw.sock"
export DOCKER_UNIX_SOCKET_READ_TIMEOUT="3"
export DOCKER_UNIX_SOCKET_WRITE_TIMEOUT="3"

export DOCKER_CONTAINER_HOSTNAME="glot"
export DOCKER_CONTAINER_USER="glot"
export DOCKER_CONTAINER_MEMORY="1000000000"
export DOCKER_CONTAINER_NETWORK_DISABLED="true"
export DOCKER_CONTAINER_ULIMIT_NOFILE_SOFT="90"
export DOCKER_CONTAINER_ULIMIT_NOFILE_HARD="100"
export DOCKER_CONTAINER_ULIMIT_NPROC_SOFT="90"
export DOCKER_CONTAINER_ULIMIT_NPROC_HARD="100"
export DOCKER_CONTAINER_CAP_DROP="MKNOD NET_RAW NET_BIND_SERVICE"
export DOCKER_CONTAINER_READONLY_ROOTFS="true"
export DOCKER_CONTAINER_TMP_DIR_PATH="/tmp"
export DOCKER_CONTAINER_TMP_DIR_OPTIONS="rw,noexec,nosuid,size=65536k"
export DOCKER_CONTAINER_WORK_DIR_PATH="/home/glot"
export DOCKER_CONTAINER_WORK_DIR_OPTIONS="rw,exec,nosuid,size=131072k"


export RUN_MAX_EXECUTION_TIME="10"
export RUN_MAX_OUTPUT_SIZE="100000"

export DEBUG_KEEP_CONTAINER="false"

export RUST_LOG=debug

cargo run
