diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..f34a1be7 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,37 @@ +Dockerfile +.git* + +# Logs +logs +*.log +npm-debug.log* +lerna-debug.log +yarn-debug.log* +yarn-error.log* + +# Build +/node_modules +/packages/*/lib/ +/packages/*/node_modules/ + +# Website build directory +website/site + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# VS Code files +.vscode + +# Yarn Integrity file +.yarn-integrity + +# OS files +.DS_Store +._* +Thumbs.db + +.history diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..9c516df1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM node:16 + +# Copy code and set working directory +COPY ./ /usr/src/ace +WORKDIR /usr/src/ace + +# Install Chromium +RUN apt-get update && apt-get install -y chromium && rm -rf /var/lib/apt/lists/* + +# Install app dependencies +RUN yarn install --network-timeout 100000 + +# for the healthcheck use ACE_HOST if defined. Otherwise use localhost +HEALTHCHECK --interval=15s --timeout=10s --start-period=5s \ + CMD http_proxy="" https_proxy="" HTTP_PROXY="" HTTPS_PROXY="" \ + curl --fail http://${ACE_HOST:-localhost}:${ACE_PORT:-8000}/jobs \ + || exit 1 + +# output ace version and start ace +# ACE_VERBOSITY is meant to be set to either -s or -V +CMD yarn run ace-http -v && \ + yarn run ace-http -H ${ACE_HOST:-localhost} \ + -p ${ACE_PORT:-8000} \ + -l ${ACE_LANG:-en} \ + ${ACE_VERBOSITY:-}