Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7972a7bed | ||
|
|
23c654c5d1 |
No files matched your search
+7
-16
@@ -1,23 +1,14 @@
|
|||||||
FROM node:18-alpine as sass
|
|
||||||
|
|
||||||
RUN NODE_OPTIONS=--dns-result-order=ipv4first npm install -g sass
|
|
||||||
WORKDIR /build
|
|
||||||
COPY ./static/style ./style
|
|
||||||
RUN sass ./style:./style \
|
|
||||||
--no-source-map \
|
|
||||||
--style=compressed
|
|
||||||
|
|
||||||
|
|
||||||
FROM python:3.11-slim
|
FROM python:3.11-slim
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y curl && \
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
|
||||||
|
apt-get install -y nodejs && \
|
||||||
|
NODE_OPTIONS=--dns-result-order=ipv4first npm install -g sass && \
|
||||||
|
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=sass /build/style/ ./static/style/
|
|
||||||
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
ENV FLASK_ENV=production
|
CMD flask run --host 0.0.0.0
|
||||||
ENV PYTHONUNBUFFERED=1
|
|
||||||
|
|
||||||
CMD ["gunicorn", "app:app", "-b", "0.0.0.0:80", "--workers", "4"]
|
|
||||||
@@ -2,9 +2,7 @@ from os import system as console
|
|||||||
from flask import Flask, render_template
|
from flask import Flask, render_template
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
console("sass static/style/main.scss static/style/main.css")
|
||||||
if app.debug:
|
|
||||||
console("sass static/style/main.scss static/style/main.css")
|
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def index():
|
def index():
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
Flask==3.1.1
|
Flask==3.1.1
|
||||||
gunicorn
|
|
||||||
Reference in new issue
Block a user