improve dev workflow

(cherry picked from commit 50a08a2b66)
This commit is contained in:
itismadness
2021-06-22 19:34:10 +00:00
committed by sheepish
parent e04b30366e
commit b248a4c766
3 changed files with 26 additions and 13 deletions

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
.idea/
.vscode/
.vagrant/
*.tar.*
MakeFile.in

View File

@@ -1,8 +1,5 @@
FROM debian:stretch-slim
COPY . /srv
WORKDIR /srv
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
build-essential \
@@ -13,19 +10,27 @@ RUN apt-get update \
libev-dev \
libjemalloc-dev \
libmysql++-dev \
pkg-config \
&& mkdir build \
pkg-config
COPY . /srv
WORKDIR /srv
RUN mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& apt-get purge -y \
build-essential \
cmake \
pkg-config \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* \
&& mv /srv/build/ocelot /srv/ocelot \
&& mv /srv/ocelot.conf.dist /srv/ocelot.conf
CMD ["/srv/ocelot"]
RUN apt-get purge -y \
build-essential \
cmake \
pkg-config \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
# default listen_port value in ocelot.conf
EXPOSE 34000
CMD ["/srv/ocelot"]

View File

@@ -35,6 +35,13 @@ make
The [Gazelle installation guides](https://github.com/WhatCD/Gazelle/wiki/Gazelle-installation) include instructions for installing Ocelot as a part of the Gazelle project.
### Docker
```bash
docker build . -t ocelot
docker run -v $(pwd)/ocelot.conf:/srv/ocelot.conf ocelot
```
### Standalone Installation
* Create the following tables according to the [Gazelle database schema](https://raw.githubusercontent.com/WhatCD/Gazelle/master/gazelle.sql):