Some archeology.
authorRadek Czajka <rczajka@rczajka.pl>
Fri, 20 Sep 2024 21:16:20 +0000 (23:16 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Fri, 20 Sep 2024 21:16:20 +0000 (23:16 +0200)
Dockerfile [new file with mode: 0644]
docker-compose.yml [new file with mode: 0644]
manage [new file with mode: 0755]
requirements.txt

diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..9aaaeca
--- /dev/null
@@ -0,0 +1,23 @@
+FROM python:2.7-alpine AS base
+
+RUN    apk update && apk add --no-cache \
+       libxslt-dev libxml2-dev build-base \
+       tiff-dev jpeg-dev openjpeg-dev zlib-dev freetype-dev lcms2-dev \
+       libwebp-dev tcl-dev tk-dev harfbuzz-dev fribidi-dev \
+       libxcb-dev libpng-dev \
+       postgresql-dev
+COPY requirements.txt requirements.txt
+RUN pip install --no-cache-dir -r requirements.txt
+
+WORKDIR /app
+
+
+FROM base AS dev
+
+
+
+FROM base AS prod
+
+RUN pip install --no-cache-dir gunicorn psycopg2-binary
+
+COPY . /app
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644 (file)
index 0000000..b027789
--- /dev/null
@@ -0,0 +1,9 @@
+version: '3'
+
+services:
+  dev:
+    build:
+      context: .
+      target: dev
+    volumes:
+      - .:/app
diff --git a/manage b/manage
new file mode 100755 (executable)
index 0000000..c27ba11
--- /dev/null
+++ b/manage
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if [ "$1" = "runserver" ]
+then
+    PORT="$2"
+    [ -z "$PORT" ] && PORT=8000
+    EXPOSED=127.0.0.1:"$PORT"
+    echo "expose as: $EXPOSED"
+    exec docker-compose run -p "$EXPOSED":"$PORT" dev python $PYARGS manage.py runserver 0.0.0.0:"$PORT"
+else
+    exec docker-compose run dev python $PYARGS manage.py "$@"
+fi
index b283ef4..7c9afd7 100644 (file)
@@ -3,7 +3,7 @@
 Django>=1.6,<1.7
 South>=0.7.4
 django-pipeline>=1.3,<1.4
 Django>=1.6,<1.7
 South>=0.7.4
 django-pipeline>=1.3,<1.4
-python-memcached
+python-memcached==1.53
 django-piwik
 django-extensions==1.5.7  # because South
 django-piston==0.2.2.1.2
 django-piwik
 django-extensions==1.5.7  # because South
 django-piston==0.2.2.1.2
@@ -21,7 +21,7 @@ Feedparser
 django-honeypot
 
 # Librarian
 django-honeypot
 
 # Librarian
-lxml>=3.0
+lxml==3.3.5
 texml
 
 # sponsors
 texml
 
 # sponsors
@@ -29,16 +29,17 @@ pillow
 django-sponsors>=1.1,<1.2
 
 django-haystack>=2.0,<2.1
 django-sponsors>=1.1,<1.2
 
 django-haystack>=2.0,<2.1
-pysolr>=3,<4
+pysolr==3.2.0
 
 pybbm>=0.14,<0.15
 
 pybbm>=0.14,<0.15
+django-annoying==0.7.9
 django-libravatar
 
 sorl-thumbnail>=11,<12
 django-libravatar
 
 sorl-thumbnail>=11,<12
-pyyaml
+pyyaml==3.11
 
 django-subdomains>=2.0.4,<2.1
 
 markdown2
 
 
 django-subdomains>=2.0.4,<2.1
 
 markdown2
 
-mailchimp3
\ No newline at end of file
+mailchimp3