|
|
@@ -0,0 +1,32 @@
|
|
|
+FROM python:3.11
|
|
|
+
|
|
|
+ENV APP_HOME=/app
|
|
|
+RUN mkdir -p $APP_HOME
|
|
|
+
|
|
|
+WORKDIR $APP_HOME
|
|
|
+
|
|
|
+# install system dependencies
|
|
|
+RUN apt-get update && apt-get install -y nginx sqlite3 netcat-traditional vim curl jq
|
|
|
+
|
|
|
+COPY ./src/requirements.txt .
|
|
|
+
|
|
|
+RUN pip install --upgrade pip
|
|
|
+RUN pip install --no-cache-dir --no-deps -r requirements.txt
|
|
|
+
|
|
|
+# copia fichero de configuración de nginx
|
|
|
+
|
|
|
+COPY ./nginx/nginx.conf /etc/nginx/
|
|
|
+
|
|
|
+# enlace los logs de nginx a stdout
|
|
|
+RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log
|
|
|
+
|
|
|
+COPY ./entrypoint.sh .
|
|
|
+
|
|
|
+COPY . $APP_HOME
|
|
|
+
|
|
|
+RUN chmod +x /app/entrypoint.sh
|
|
|
+
|
|
|
+WORKDIR $APP_HOME/src
|
|
|
+
|
|
|
+# run entrypoint.sh
|
|
|
+ENTRYPOINT ["/app/entrypoint.sh"]
|