mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Added Dockerfile/supervisor, but need to use environmental variables to change domain name
Former-commit-id: e596931b57c0205389e45da6aa9f3a71fd53d133 [formerly 317f1a4c9a7b67b8f9e5213ab2a8036ea7d69f98] [formerly b20e0910c4dc5c50fbebe94d487368e039aa1637 [formerly 75acd8636503d99abd3ad513d0cad881d2a76afc [formerlyb91f25b83c
]]] Former-commit-id: 0e244da8fd48a642e50a38aede3e0455aaeb3282 [formerly 326a4f4009de0135ac9f28db850f05a238738d11] Former-commit-id: b2e70d7b54a39e1bdd19f1846d42ec16f12d9ec6 Former-commit-id:66c729195f
This commit is contained in:
parent
7709b6317d
commit
9570d182e3
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