1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-11-03 10:24:14 +01:00
Commit graph

5 commits

Author SHA1 Message Date
Cao Mingjun
87bcf59bd4
Update docker-dev go version 2023-11-24 14:00:16 +00:00
binwiederhier
c0fab933a5 Build docs in venv 2023-11-16 05:31:53 -05:00
Nihal Gonsalves
5913142389 fix: remove deprecated nodesource script 2023-09-27 23:43:50 +02:00
Nihal Gonsalves
86cc3b9607 chore(build): bump Dockerfile-build go version 2023-07-10 20:14:29 +02:00
nimbleghost
11f8984127 Add a way to use Docker for building everything
I’d like to test #751 on my own instance, but installing all the build
dependencies on my server isn’t ideal - having this script in the repo
would make it possible to simply point my compose file to the git repo
and have it build the Linux binary itself.

Note that it uses a somewhat “inefficient” builder step, i.e. not
combining steps together to reduce layers, as it uses a multi-stage
build to have a lean final image. This makes it easier to re-build if
something needs to change, as the cache is used more optimally.

For example, if only some go files change, most of the build is already
cached and only the go step gets re-run.

The more “efficient” builder step would look like this, but would have
to build the docs, web app and go CLI for any change in any file:

```Dockerfile
FROM golang:1.19-bullseye as builder

RUN apt-get update && \
    curl -fsSL https://deb.nodesource.com/setup_18.x | bash && \
    apt-get install -y \
    build-essential \
    nodejs \
    python3-pip

WORKDIR /app
ADD . .

RUN make web docs cli-linux-server
```
2023-05-26 22:22:21 +02:00