mirror of
https://github.com/bugsink/bugsink.git
synced 2026-02-05 05:19:45 -06:00
Dockerfile(s): the afternoon's progress
This commit is contained in:
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
# Purpose: Dockerfile for the Bugsink project
|
||||
# Ubuntu 24.04 rather than the Python image: I want to stick as closely to the "recommended" (single server) deployment
|
||||
# as possible
|
||||
FROM ubuntu:24.04
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
|
||||
RUN apt update
|
||||
RUN apt install python3 python3-pip python3-venv -y
|
||||
|
||||
# mysqlclient dependencies
|
||||
RUN apt install default-libmysqlclient-dev pkg-config -y
|
||||
|
||||
# Venv inside Docker? I'd say yes because [1] PEP 668 and [2] harmonization with "recommended" (single server) deployment
|
||||
RUN python3 -m venv venv
|
||||
RUN venv/bin/python3 -m pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 9000
|
||||
|
||||
CMD ["venv/bin/gunicorn", "--bind=0.0.0.0:9000", "--access-logfile", "-", "bugsink.wsgi"]
|
||||
7
Dockerfile.db
Normal file
7
Dockerfile.db
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM mysql
|
||||
|
||||
ENV MYSQL_DATABASE=bugsink
|
||||
ENV MYSQL_USER=bugsink
|
||||
|
||||
# Expose the default port
|
||||
EXPOSE 3306
|
||||
Reference in New Issue
Block a user