diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..443ee305 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,9 @@ +FROM docker.io/gotify/build:1.25.1-linux-amd64 + +ENV NVM_DIR /root/.nvm +ENV NODE_VERSION 22 + +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash \ + && . $NVM_DIR/nvm.sh \ + && nvm install 22 \ + && npm install --global yarn \ No newline at end of file diff --git a/.devcontainer/config-environment.sh b/.devcontainer/config-environment.sh new file mode 100644 index 00000000..c4a853dd --- /dev/null +++ b/.devcontainer/config-environment.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +make download-tools +go get + +cd ui +yarn diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..f2867c9d --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,14 @@ +{ + "name": "Gotify Server", + //Need to customize the docker build container to add misisng tools (nvm, npm, yarn) + "build": { + "dockerfile": "Dockerfile" + }, + + "containerEnv": { + "GOTIFY_SERVER_PORT": "8080" + }, + + // Download required toolchains with `make` and `yarn` + "postCreateCommand": "bash .devcontainer/config-environment.sh" +} diff --git a/server b/server new file mode 100755 index 00000000..00cdf840 Binary files /dev/null and b/server differ