fix: Dockerfile

This commit is contained in:
2024-05-13 14:20:37 +02:00
parent d8fa4dd5e1
commit a49fb5e885
11 changed files with 6 additions and 47 deletions
+5 -6
View File
@@ -1,4 +1,4 @@
FROM python:3.11-alpine
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
@@ -8,11 +8,10 @@ RUN mkdir /code
WORKDIR /code
COPY requirements.txt /code
RUN apk update && \
apk add gcc vim postgresql-client openrc nginx && \
apk del gcc && \
openrc && \
touch /run/openrc/softlevel && \
RUN apt-get update \
&& apt-get install -y build-essential gcc git nginx gettext vim python3-dev libpq-dev \
&& apt-get purge -y build-essential \
&& apt-get autoremove -y && \
pip install -r requirements.txt
COPY . /code
-1
View File
@@ -28,7 +28,6 @@ THIRD_PARTY_APPS = [
PROJECT_APPS = [
"files",
"frontend",
"shop",
"tpv",
"users",
View File
-3
View File
@@ -1,3 +0,0 @@
from django.contrib import admin
# Register your models here.
-6
View File
@@ -1,6 +0,0 @@
from django.apps import AppConfig
class FrontendConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "frontend"
View File
-3
View File
@@ -1,3 +0,0 @@
from django.db import models
# Create your models here.
-21
View File
@@ -1,21 +0,0 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>{{ title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
},
}
</script>
</head>
<body>
{% block content %}{% endblock %}
</body>
</html>
-3
View File
@@ -1,3 +0,0 @@
from django.test import TestCase
# Create your tests here.
-3
View File
@@ -1,3 +0,0 @@
from django.shortcuts import render
# Create your views here.
+1 -1
View File
@@ -10,7 +10,7 @@ RUN_CELERY=${RUN_CELERY:="FALSE"}
if [ $RUN_SERVER = "TRUE" ]; then
rc-service nginx start
service nginx start
uvicorn --workers $ASGI_WORKERS --host $ASGI_HOST --port $ASGI_PORT config.asgi:application
elif [ $RUN_CELERY = "TRUE" ]; then
service nginx stop