some refactor in docer-compose and Docker- add nginx from source

prod
Dmitriy Shesterkin 9 years ago
parent 01cbd02108
commit f65b4fe4e4
  1. 17
      .dockerignore
  2. 1
      .gitignore
  3. 50
      Dockerfile
  4. 2
      conf/docker/entrypoint_stage.sh
  5. 1
      db/PG_VERSION
  6. BIN
      db/base/1/112
  7. BIN
      db/base/1/113
  8. BIN
      db/base/1/12242
  9. BIN
      db/base/1/12242_fsm
  10. BIN
      db/base/1/12242_vm
  11. 0
      db/base/1/12244
  12. BIN
      db/base/1/12246
  13. BIN
      db/base/1/12247
  14. BIN
      db/base/1/12247_fsm
  15. BIN
      db/base/1/12247_vm
  16. 0
      db/base/1/12249
  17. BIN
      db/base/1/12251
  18. BIN
      db/base/1/12252
  19. BIN
      db/base/1/12252_fsm
  20. BIN
      db/base/1/12252_vm
  21. 0
      db/base/1/12254
  22. BIN
      db/base/1/12256
  23. BIN
      db/base/1/12257
  24. BIN
      db/base/1/12257_fsm
  25. BIN
      db/base/1/12257_vm
  26. 0
      db/base/1/12259
  27. BIN
      db/base/1/12261
  28. BIN
      db/base/1/12262
  29. BIN
      db/base/1/12262_fsm
  30. BIN
      db/base/1/12262_vm
  31. 0
      db/base/1/12264
  32. BIN
      db/base/1/12266
  33. BIN
      db/base/1/12267
  34. BIN
      db/base/1/12267_fsm
  35. BIN
      db/base/1/12267_vm
  36. 0
      db/base/1/12269
  37. BIN
      db/base/1/12271
  38. 0
      db/base/1/12272
  39. 0
      db/base/1/12274
  40. BIN
      db/base/1/12276
  41. BIN
      db/base/1/1247
  42. BIN
      db/base/1/1247_fsm
  43. BIN
      db/base/1/1247_vm
  44. BIN
      db/base/1/1249
  45. BIN
      db/base/1/1249_fsm
  46. BIN
      db/base/1/1249_vm
  47. BIN
      db/base/1/1255
  48. BIN
      db/base/1/1255_fsm
  49. BIN
      db/base/1/1255_vm
  50. BIN
      db/base/1/1259
  51. BIN
      db/base/1/1259_fsm
  52. BIN
      db/base/1/1259_vm
  53. 0
      db/base/1/1417
  54. 0
      db/base/1/1417_vm
  55. 0
      db/base/1/1418
  56. 0
      db/base/1/1418_vm
  57. BIN
      db/base/1/174
  58. BIN
      db/base/1/175
  59. BIN
      db/base/1/2187
  60. 0
      db/base/1/2328
  61. 0
      db/base/1/2328_vm
  62. 0
      db/base/1/2336
  63. 0
      db/base/1/2336_vm
  64. BIN
      db/base/1/2337
  65. BIN
      db/base/1/2600
  66. BIN
      db/base/1/2600_fsm
  67. BIN
      db/base/1/2600_vm
  68. BIN
      db/base/1/2601
  69. BIN
      db/base/1/2601_fsm
  70. BIN
      db/base/1/2601_vm
  71. BIN
      db/base/1/2602
  72. BIN
      db/base/1/2602_fsm
  73. BIN
      db/base/1/2602_vm
  74. BIN
      db/base/1/2603
  75. BIN
      db/base/1/2603_fsm
  76. BIN
      db/base/1/2603_vm
  77. 0
      db/base/1/2604
  78. 0
      db/base/1/2604_vm
  79. BIN
      db/base/1/2605
  80. BIN
      db/base/1/2605_fsm
  81. BIN
      db/base/1/2605_vm
  82. BIN
      db/base/1/2606
  83. BIN
      db/base/1/2606_fsm
  84. BIN
      db/base/1/2606_vm
  85. BIN
      db/base/1/2607
  86. BIN
      db/base/1/2607_fsm
  87. BIN
      db/base/1/2607_vm
  88. BIN
      db/base/1/2608
  89. BIN
      db/base/1/2608_fsm
  90. BIN
      db/base/1/2608_vm
  91. BIN
      db/base/1/2609
  92. BIN
      db/base/1/2609_fsm
  93. BIN
      db/base/1/2609_vm
  94. BIN
      db/base/1/2610
  95. BIN
      db/base/1/2610_fsm
  96. BIN
      db/base/1/2610_vm
  97. 0
      db/base/1/2611
  98. 0
      db/base/1/2611_vm
  99. BIN
      db/base/1/2612
  100. BIN
      db/base/1/2612_fsm
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,8 +1,9 @@
env
compose
public
node_modules
bower_components
tmp_emails
tmp
var
/env
/compose
/public
/node_modules
/bower_components
/tmp_emails
/tmp
/var
/db

1
.gitignore vendored

@ -18,6 +18,7 @@ yandex_money.log
/src/dokumentor/media/
/tmp/
/data/
/db/
/public/
conf/env
!local.py

@ -1,22 +1,58 @@
FROM python:3.6
ENV PYTHONUNBUFFERED 1
ENV NGINX_VERSION="1.12.0" \
NGINX_OPTS="--with-http_ssl_module \
--with-http_gzip_static_module \
--prefix=/usr/share/nginx \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--pid-path=/var/run/nginx.pid \
--http-log-path=/var/log/nginx/access.log \
--error-log-path=/var/log/nginx/error.log \
--user=www-data \
--group=www-data \
--add-module=/tmp/modules/nginx_requestid-master"
COPY requirements /opt/app/requirements
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get -y install ghostscript libfreetype6-dev python3-dev nginx supervisor make && \
apt-get -y install ghostscript \
libfreetype6-dev \
python3-dev \
supervisor \
make && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
# Download additional nginx modules
mkdir -p /tmp/modules && \
cd /tmp/modules && \
wget -O nginx-requestid.tar.gz https://github.com/hhru/nginx_requestid/archive/master.tar.gz && \
tar xvzf nginx-requestid.tar.gz && \
# Download and compile nginx
cd /tmp && \
wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \
tar xzvf nginx-${NGINX_VERSION}.tar.gz && \
cd nginx-${NGINX_VERSION} && \
./configure ${NGINX_OPTS} && \
make && \
make install && \
pip install --upgrade pip && \
pip install --no-cache-dir -r /opt/app/requirements/production.txt && \
# Nginx
chown -R www-data:www-data /var/lib/nginx && \
# Delete build dependencies after use
rm -r /root/.cache
cd /tmp \
&& rm -rf \
modules \
nginx-${NGINX_VERSION} \
nginx-${NGINX_VERSION}.tar.gz \
/var/cache/apt/* \
/root/.cache \
/var/lib/apt/lists/*
# for gitlab cli
COPY . /opt/app
VOLUME ["/opt/app/public/media"]
WORKDIR /opt/app

@ -11,7 +11,7 @@ python src/manage.py collectstatic --noinput
# Make database migrations
echo "Make database migrations"
python src/manage.py makemigrations
python src/manage.py makemigrations
# Apply database migrations
echo "Apply database migrations"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save