diff --git a/.github/workflows/docker-standard-notes.yml b/.github/workflows/docker-standard-notes.yml new file mode 100644 index 0000000..0d199be --- /dev/null +++ b/.github/workflows/docker-standard-notes.yml @@ -0,0 +1,33 @@ +name: docker + +on: + schedule: + - cron: "0 0 * * 1" + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + push: true + tags: nite07/standard-notes-frontend:latest + platforms: linux/amd64,linux/arm64,linux/arm/v7 + file: ./Dockerfile-standard-notes diff --git a/.github/workflows/docker.yml b/.github/workflows/docker-tailscale-derper.yml similarity index 94% rename from .github/workflows/docker.yml rename to .github/workflows/docker-tailscale-derper.yml index 254e0fc..fc954b9 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker-tailscale-derper.yml @@ -30,3 +30,4 @@ jobs: push: true tags: nite07/tailscale-derp-docker:latest platforms: linux/amd64,linux/arm64,linux/arm/v7 + file: ./Dockerfile-tailscale-derper diff --git a/Dockerfile-standard-notes b/Dockerfile-standard-notes new file mode 100644 index 0000000..19b09a4 --- /dev/null +++ b/Dockerfile-standard-notes @@ -0,0 +1,12 @@ +FROM node:16 AS builder + +WORKDIR /app + +RUN git clone https://github.com/standardnotes/app.git . +RUN yarn install +RUN yarn build:web + +FROM nginx:alpine +WORKDIR /usr/share/nginx/html +COPY --from=builder /app/packages/web . +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/Dockerfile b/Dockerfile-tailscale-derper similarity index 100% rename from Dockerfile rename to Dockerfile-tailscale-derper diff --git a/README-tailscale-derper.md b/README-tailscale-derper.md new file mode 100644 index 0000000..6e333fe --- /dev/null +++ b/README-tailscale-derper.md @@ -0,0 +1,28 @@ +# Environment Variables + +| Name | Description | Default Value | +| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | +| DERP_HOSTNAME | Specifies the domain for the DERP server. | `example.com` | +| DERP_CERTMODE | Determines the SSL/TLS certificate management mode. Options: `manual`, `letsencrypt` | `letsencrypt` | +| DERP_ADDR | Sets the server address and port to bind to. | `:443` | +| DERP_VERIFY_CLIENTS | Whether to verify clients connecting to the DERP server. [reference](https://tailscale.com/kb/1118/custom-derp-servers#optional-restricting-client-access-to-your-derp-node) | `false` | +| DERP_HTTP_PORT | Sets the port for the HTTP server. | `80` | +| DERP_STUN_ENABLE | Whether to enable STUN. | `true` | +| DERP_STUN_PORT | Sets the port for the STUN server. | `3478` | + +# Volumes + +| Name | Description | +| ---------- | ------------------------------------------------ | +| /app/certs | Directory where SSL/TLS certificates are stored. | + +# Usage + +```shell +docker run -d --name derper \ + -p 80:80 -p 443:443 -p 3478:3478/udp \ + -e DERP_DOMAIN=example.com \ + nite07/tailscale-derp-docker:latest +``` + +[Adding DERP servers to your tailnet](https://tailscale.com/kb/1118/custom-derp-servers#step-2-adding-derp-servers-to-your-tailnet) diff --git a/README.md b/README.md index 6e333fe..3a90767 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,2 @@ -# Environment Variables - -| Name | Description | Default Value | -| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -| DERP_HOSTNAME | Specifies the domain for the DERP server. | `example.com` | -| DERP_CERTMODE | Determines the SSL/TLS certificate management mode. Options: `manual`, `letsencrypt` | `letsencrypt` | -| DERP_ADDR | Sets the server address and port to bind to. | `:443` | -| DERP_VERIFY_CLIENTS | Whether to verify clients connecting to the DERP server. [reference](https://tailscale.com/kb/1118/custom-derp-servers#optional-restricting-client-access-to-your-derp-node) | `false` | -| DERP_HTTP_PORT | Sets the port for the HTTP server. | `80` | -| DERP_STUN_ENABLE | Whether to enable STUN. | `true` | -| DERP_STUN_PORT | Sets the port for the STUN server. | `3478` | - -# Volumes - -| Name | Description | -| ---------- | ------------------------------------------------ | -| /app/certs | Directory where SSL/TLS certificates are stored. | - -# Usage - -```shell -docker run -d --name derper \ - -p 80:80 -p 443:443 -p 3478:3478/udp \ - -e DERP_DOMAIN=example.com \ - nite07/tailscale-derp-docker:latest -``` - -[Adding DERP servers to your tailnet](https://tailscale.com/kb/1118/custom-derp-servers#step-2-adding-derp-servers-to-your-tailnet) +- [tailscale derper](./README-tailscale-derper.md) +- standard notes frontend