Initial commit.
This commit is contained in:
33
Dockerfile
Normal file
33
Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Install only the necessary client libraries
|
||||
RUN apt-get update && apt-get install -y \
|
||||
default-libmysqlclient-dev \
|
||||
build-essential \
|
||||
pkg-config \
|
||||
wait-for-it \
|
||||
# curl \
|
||||
# && curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
|
||||
# && apt-get install -y node.js \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY app/ .
|
||||
|
||||
# # Install npm dependencies and build static assets
|
||||
# RUN if [ -f "package.json" ]; then npm install && npm run build; fi
|
||||
|
||||
ENV FLASK_APP=app.py
|
||||
ENV FLASK_ENV=production
|
||||
|
||||
CMD echo "PW=$DB_PASSWORD"
|
||||
|
||||
EXPOSE 8569
|
||||
|
||||
# CMD ["gunicorn", "--bind", "0.0.0.0:8569", "app:app"]
|
||||
CMD wait-for-it dev_partsltd_co_uk_db:3306 -t 60 -- gunicorn --bind 0.0.0.0:8569 app:app
|
||||
# --access-logfile - --access-logformat '%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"' app:app
|
||||
Reference in New Issue
Block a user