Add docker compose
This commit is contained in:
parent
783a58d954
commit
86a9ebb90a
3 changed files with 60 additions and 0 deletions
39
Dockerfile
Normal file
39
Dockerfile
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
# Install required dependencies
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
libxml2-dev \
|
||||||
|
curl-dev \
|
||||||
|
shadow \
|
||||||
|
git \
|
||||||
|
make \
|
||||||
|
gcc \
|
||||||
|
musl-dev \
|
||||||
|
pkgconf \
|
||||||
|
openssl-dev \
|
||||||
|
openrc
|
||||||
|
|
||||||
|
# Clone and install beaker
|
||||||
|
RUN git clone https://git.bwaaa.monster/beaker /tmp/beaker \
|
||||||
|
&& cd /tmp/beaker \
|
||||||
|
&& make \
|
||||||
|
&& make install \
|
||||||
|
&& rm -rf /tmp/beaker
|
||||||
|
|
||||||
|
# Import omnisearch source
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
# Clone and install omnisearch
|
||||||
|
RUN cd /app \
|
||||||
|
&& make \
|
||||||
|
&& make install-openrc
|
||||||
|
|
||||||
|
# Enable OpenRC and start the service
|
||||||
|
RUN rc-update add omnisearch default
|
||||||
|
|
||||||
|
# Expose the default port
|
||||||
|
EXPOSE 5000
|
||||||
|
|
||||||
|
# Start OpenRC and the service
|
||||||
|
CMD sh -c "openrc default && touch /run/openrc/softlevel && omnisearch"
|
||||||
14
README.md
14
README.md
|
|
@ -108,6 +108,20 @@ On macOS, use `install-launchd`.
|
||||||
## Hosting
|
## Hosting
|
||||||
Run it normally behind a reverse proxy (like nginx)
|
Run it normally behind a reverse proxy (like nginx)
|
||||||
|
|
||||||
|
## Deploy with Docker Compose
|
||||||
|
|
||||||
|
You need Docker or Podman and Docker Compose installed on your system.
|
||||||
|
|
||||||
|
Run the container:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ git clone https://git.bwaaa.monster/omnisearch
|
||||||
|
$ cd omnisearch
|
||||||
|
$ docker compose up -d --build
|
||||||
|
```
|
||||||
|
|
||||||
|
By default it can be reached on port 5000.
|
||||||
|
|
||||||
## Customisation
|
## Customisation
|
||||||
To make your own changes while still being able to receive upstream updates:
|
To make your own changes while still being able to receive upstream updates:
|
||||||
|
|
||||||
|
|
|
||||||
7
docker-compose.yml
Normal file
7
docker-compose.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
services:
|
||||||
|
omnisearch:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
ports:
|
||||||
|
- "5000:5000"
|
||||||
Loading…
Add table
Reference in a new issue