forked from mirrors/ntfy
1
0
Fork 0
Commit Graph

3 Commits

Author SHA1 Message Date
Vincent Batts 8eecd3c72a
Dockerfile*: use my images
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2023-06-03 15:33:31 -04:00
Vincent Batts 77f5dd705c
*: python pip in debian bookworm/testing needs venv
When testing this build using the upcoming debian bookworm/testing, the
python pip v3.11 fails to install requirements that may clobber the host
install packages. It prints out that venv must be used.

This change works fine on the current debian bullseye, and will continue
to work once folks switch to the upcoming debian bookworm release.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2023-06-03 15:29:51 -04: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