diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..ca31976f9 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,92 @@ +# Created by .ignore support plugin (hsz.mobi) +### Node template +# Logs +/logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# Nuxt generate +dist + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless + +# IDE / Editor +.idea + +# Service worker +sw.* + +# macOS +.DS_Store + +# Vim swap files +*.swp + +Dockerfile diff --git a/.github/workflows/docker-compile-master.yml b/.github/workflows/docker-compile-master.yml new file mode 100644 index 000000000..fc9dcd0d3 --- /dev/null +++ b/.github/workflows/docker-compile-master.yml @@ -0,0 +1,21 @@ +name: Docker image build + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build and push Docker images + uses: docker/build-push-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: modrinth/knossos + tag_with_ref: false + tags: master + tag_with_sha: true diff --git a/.github/workflows/docker-compile-tag.yml b/.github/workflows/docker-compile-tag.yml new file mode 100644 index 000000000..deb344bde --- /dev/null +++ b/.github/workflows/docker-compile-tag.yml @@ -0,0 +1,22 @@ +name: Docker image build + +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build and push Docker images + uses: docker/build-push-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: modrinth/knossos + tag_with_ref: true + tags: latest + tag_with_sha: true diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..89c505e78 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +# Dockerfile +FROM node:11.13.0-alpine + +# create destination directory +RUN mkdir -p /usr/src/knossos +WORKDIR /usr/src/knossos + +# update and install dependency +RUN apk update && apk upgrade +RUN apk add git + +# copy the app, note .dockerignore +COPY . /usr/src/knossos/ +RUN npm install +RUN npm run build + +EXPOSE 3000 + +ENV NUXT_HOST=0.0.0.0 +ENV NUXT_PORT=3000 + +ENTRYPOINT [ "npm", "start" ] diff --git a/layouts/default.vue b/layouts/default.vue index c2577e0b0..e4c1ee8e1 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -24,9 +24,7 @@ - - Modpacks - + Modpacks
- - falseresync - + falseresync
- +