[niko-niko] Initial commit
This commit is contained in:
parent
32a92a491b
commit
e40fe119ae
|
@ -0,0 +1,23 @@
|
|||
FROM alpine:3.7 as builder
|
||||
|
||||
RUN mkdir -p /var/cache/apk /niko-niko && ln -s /var/cache/apk /etc/apk/cache && apk add \
|
||||
--update gcc musl-dev py2-pip python-dev git
|
||||
RUN git clone https://github.com/glebb/feelings /niko-niko
|
||||
RUN pip install wheel && pip wheel --wheel-dir=/root/wheel -r /niko-niko/requirements.txt
|
||||
|
||||
FROM alpine:3.7 as production
|
||||
COPY --from=builder /root/wheel /root/wheel
|
||||
COPY --from=builder /root/.cache /root/.cache
|
||||
COPY --from=builder /etc/apk/cache /etc/apk/cache
|
||||
COPY --from=builder /niko-niko/ /niko-niko
|
||||
|
||||
RUN apk add --update py2-pip python && pip install --no-index \
|
||||
--find-links=/root/wheel -r /niko-niko/requirements.txt
|
||||
|
||||
RUN rm -rf /root/.cache /etc/apk/cache/* /root/wheel/
|
||||
|
||||
WORKDIR /niko-niko
|
||||
|
||||
CMD ["python", "tornado_server.py"]
|
||||
|
||||
EXPOSE 8080
|
|
@ -0,0 +1,21 @@
|
|||
# Niko-niko calendar
|
||||
A calendar to see the feelings of one or more people.
|
||||
|
||||
## Configuration
|
||||
Copy the sqlite database:
|
||||
``` bash
|
||||
docker run -ti --name niko-niko niko-niko sleep 1
|
||||
docker cp niko-niko:/niko-niko/feelings.sqlite .
|
||||
```
|
||||
|
||||
Run the webserver:
|
||||
|
||||
``` bash
|
||||
docker run -ti -p 8080:8080 -v `pwd`/feelings.sqlite:/niko-niko/feelings.sqlite niko-niko
|
||||
```
|
||||
|
||||
## Use
|
||||
The application supports multiple users. You can use it attacking to
|
||||
`http://whatever:8080/?category=name`. You can visualiza the data at
|
||||
`http://whatever:8080/results` or `http://whatever:8080/show_avg`. You may
|
||||
filter using the `category` parameter.
|
Loading…
Reference in New Issue