Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

57 lignes
1.7 KiB

  1. # -----------------------------------------------------------------------------
  2. # docker-pinry
  3. #
  4. # Builds a basic docker image that can run Pinry (http://getpinry.com) and serve
  5. # all of it's assets, there are more optimal ways to do this but this is the
  6. # most friendly and has everything contained in a single instance.
  7. #
  8. # Authors: Isaac Bythewood
  9. # Updated: Mar 29th, 2016
  10. # Require: Docker (http://www.docker.io/)
  11. # -----------------------------------------------------------------------------
  12. # Base system is the LTS version of Ubuntu.
  13. FROM python:3.7-stretch
  14. RUN groupadd -g 2300 tmpgroup \
  15. && usermod -g tmpgroup www-data \
  16. && groupdel www-data \
  17. && groupadd -g 1000 www-data \
  18. && usermod -g www-data www-data \
  19. && usermod -u 1000 www-data \
  20. && groupdel tmpgroup
  21. RUN mkdir /data
  22. RUN chown -R www-data:www-data /data
  23. RUN apt-get update \
  24. && apt-get -y install nginx nginx-extras pwgen \
  25. && rm -rf /var/lib/apt/lists/* \
  26. && apt-get autoclean
  27. # required for other database options
  28. RUN pip --no-cache-dir install pipenv gunicorn mysqlclient psycopg2 cx-Oracle
  29. # COPY and start installation
  30. COPY . /pinry
  31. RUN cd /pinry \
  32. && pipenv install --three --system --clear
  33. # config nodejs
  34. RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n || exit
  35. RUN bash n 10
  36. RUN npm -g install yarn
  37. # build frontend
  38. RUN cd /pinry/pinry-spa/ && yarn install && yarn build
  39. # Load in all of our config files.
  40. ADD docker/nginx/nginx.conf /etc/nginx/nginx.conf
  41. ADD docker/nginx/sites-enabled/default /etc/nginx/sites-enabled/default
  42. # 80 is for nginx web, /data contains static files and database /start runs it.
  43. EXPOSE 80
  44. VOLUME ["/data"]
  45. CMD ["/pinry/docker/scripts/start.sh"]