mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Merge branch 'master' of github.com:schollz/cowyo
Former-commit-id: 0c5a0227d3c996978241ae125bba416f41284521 [formerly 2e68471c6027279f6e195e99fdafcc47e4154567] [formerly 44f2ad878585e9feac1b9adbe06e1be548b303ee [formerly 0d2252223d
]]
Former-commit-id: 7794ebbcd50df65483f3e4bf1712a95f6ce19424 [formerly e29b8a5e8dab53c7f359c6a244793106520fbf3a]
Former-commit-id: 08725c514ef4ccbbaf66d6e7c32bc97f457a00f9
This commit is contained in:
commit
9eb8d24c92
32
Dockerfile
Normal file
32
Dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
# sudo docker build -t cowyo .
|
||||
# sudo docker run -it -p 8003:8003 -v `pwd`/data:/data cowyo bash
|
||||
FROM ubuntu:16.04
|
||||
|
||||
# Get basics
|
||||
RUN apt-get update
|
||||
RUN apt-get -y upgrade
|
||||
RUN apt-get install -y golang git wget curl vim
|
||||
RUN mkdir /usr/local/work
|
||||
ENV GOPATH /usr/local/work
|
||||
|
||||
# Install cowyo
|
||||
WORKDIR "/root"
|
||||
RUN go get github.com/schollz/cowyo
|
||||
RUN git clone https://github.com/schollz/cowyo.git
|
||||
WORKDIR "/root/cowyo"
|
||||
RUN git pull
|
||||
RUN go build
|
||||
|
||||
# Setup supervisor
|
||||
RUN apt-get update && apt-get install -y supervisor
|
||||
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
# Add Tini
|
||||
ENV TINI_VERSION v0.9.0
|
||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
|
||||
RUN chmod +x /tini
|
||||
ENTRYPOINT ["/tini", "--"]
|
||||
|
||||
# Startup
|
||||
CMD ["/usr/bin/supervisord"]
|
11
supervisord.conf
Normal file
11
supervisord.conf
Normal file
@ -0,0 +1,11 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[program:cowyoserver]
|
||||
directory=/root/cowyo
|
||||
command=/root/cowyo/cowyo -db /data/cowyo.db 127.0.0.1:8003
|
||||
priority=1
|
||||
stdout_logfile=/root/cowyo/log.out
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/root/cowyo/log.err
|
||||
stderr_logfile_maxbytes=0
|
Loading…
Reference in New Issue
Block a user