Browse Source

dockerize couchdb, move entrypoint for web

pull/1/head
Wesley Kerfoot 5 years ago
parent
commit
1e30151575
  1. 13
      app/Dockerfile
  2. 0
      app/blogPosts.json
  3. 4
      app/run.sh
  4. 2
      couchdb/Dockerfile
  5. 4
      docker-compose.yml

13
app/Dockerfile

@ -1,22 +1,33 @@
FROM ubuntu:latest
MAINTAINER wes kerfoot "wjak56@gmail.com"
RUN apt-get update -y
RUN apt-get install -y python3-pip python3-dev build-essential
RUN apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_11.x | bash
RUN apt-get install -y sassc nodejs
RUN npm install -g uglifycss uglifyjs
COPY . ./src
WORKDIR /src
RUN npm install
RUN pip3 install -r /src/requirements.txt
RUN mkdir -p ./build/styles ./build/scripts
RUN npm run-script build_riotblog
RUN npm run-script build_editor
RUN sassc ./styles/riotblog.scss > ./styles/riotblog.intermediate.min.css
RUN cp ./styles/*.css ./build/styles/
RUN uglifycss ./styles/*.css > ./build/styles/riotblog.min.css
ENTRYPOINT ["python3"]
ENV RIOTBLOG_SETTINGS "/src/riotblog_local.cfg"
COPY run.sh /run.sh
COPY blogPosts.json /blogPosts.json
ENTRYPOINT ["/bin/bash", "/run.sh"]
CMD ["/src/website.py"]
EXPOSE 80

0
couchdb/blogPosts.json → app/blogPosts.json

4
app/run.sh

@ -0,0 +1,4 @@
#! /bin/bash
touch /wtfisthis
exec python3 "$@"

2
couchdb/Dockerfile

@ -0,0 +1,2 @@
FROM couchdb:2.3
MAINTAINER wes kerfoot "wjak56@gmail.com"

4
docker-compose.yml

@ -5,8 +5,10 @@ services:
ports:
- "80"
network_mode: host
env_file:
- "./.envrc"
couch:
image: couchdb
build: couchdb
ports:
- "127.0.0.1:5984:5984"
env_file:

Loading…
Cancel
Save