fix: Dockerfile
This commit is contained in:
+5
-6
@@ -1,4 +1,4 @@
|
|||||||
FROM python:3.11-alpine
|
FROM python:3.12-slim
|
||||||
|
|
||||||
ENV PYTHONDONTWRITEBYTECODE 1
|
ENV PYTHONDONTWRITEBYTECODE 1
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
@@ -8,11 +8,10 @@ RUN mkdir /code
|
|||||||
WORKDIR /code
|
WORKDIR /code
|
||||||
COPY requirements.txt /code
|
COPY requirements.txt /code
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apt-get update \
|
||||||
apk add gcc vim postgresql-client openrc nginx && \
|
&& apt-get install -y build-essential gcc git nginx gettext vim python3-dev libpq-dev \
|
||||||
apk del gcc && \
|
&& apt-get purge -y build-essential \
|
||||||
openrc && \
|
&& apt-get autoremove -y && \
|
||||||
touch /run/openrc/softlevel && \
|
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
COPY . /code
|
COPY . /code
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ THIRD_PARTY_APPS = [
|
|||||||
|
|
||||||
PROJECT_APPS = [
|
PROJECT_APPS = [
|
||||||
"files",
|
"files",
|
||||||
"frontend",
|
|
||||||
"shop",
|
"shop",
|
||||||
"tpv",
|
"tpv",
|
||||||
"users",
|
"users",
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
from django.contrib import admin
|
|
||||||
|
|
||||||
# Register your models here.
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
from django.apps import AppConfig
|
|
||||||
|
|
||||||
|
|
||||||
class FrontendConfig(AppConfig):
|
|
||||||
default_auto_field = "django.db.models.BigAutoField"
|
|
||||||
name = "frontend"
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
from django.db import models
|
|
||||||
|
|
||||||
# Create your models here.
|
|
||||||
@@ -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>
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
from django.test import TestCase
|
|
||||||
|
|
||||||
# Create your tests here.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
from django.shortcuts import render
|
|
||||||
|
|
||||||
# Create your views here.
|
|
||||||
+1
-1
@@ -10,7 +10,7 @@ RUN_CELERY=${RUN_CELERY:="FALSE"}
|
|||||||
|
|
||||||
|
|
||||||
if [ $RUN_SERVER = "TRUE" ]; then
|
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
|
uvicorn --workers $ASGI_WORKERS --host $ASGI_HOST --port $ASGI_PORT config.asgi:application
|
||||||
elif [ $RUN_CELERY = "TRUE" ]; then
|
elif [ $RUN_CELERY = "TRUE" ]; then
|
||||||
service nginx stop
|
service nginx stop
|
||||||
|
|||||||
Reference in New Issue
Block a user