This commit is contained in:
Xavier Fiechter 2025-11-18 22:39:20 +01:00
parent d74b99d05f
commit 2f517a3ef8
7 changed files with 19 additions and 9 deletions

View file

@ -11,7 +11,7 @@ RUN apt-get update && \
default-libmysqlclient-dev \
build-essential \
cron vim logrotate \
libpcre3-dev \
libpcre2-dev \
default-mysql-client \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --upgrade pip \

View file

@ -61,8 +61,6 @@ def import_samourai_labels(labelbase, content, passphrase):
logger.info(f"data: {data}")
version = data.get("version", 1)
payload = data.get("payload", "")
logger.info(f"version: {version}, payload {payload}, passphrase {passphrase}")
if payload:
if version in [1, "1"]:
decrypted_data = decrypt_v1(payload, passphrase)

View file

@ -37,7 +37,8 @@ def generate_config_file(config_file_path="config.ini"):
'name': 'labelbase',
'user': 'ulabelbase',
'password': database_password,
# 'host': '127.0.0.1'
'host': os.getenv("MYSQL_HOST", "127.0.0.1"),
'port': os.getenv("MYSQL_PORT", "3306"),
}
with open(config_file_path, 'w') as configfile:

View file

@ -185,8 +185,8 @@ DATABASES = {
"USER": proj_config.get("database", "user"),
"OPTIONS": {"charset": "utf8mb4"},
"PASSWORD": proj_config.get("database", "password"),
'HOST': 'localhost',
'PORT': 3306,
'HOST': proj_config.get("database", "host", fallback="labelbase_mysql"),
'PORT': int(proj_config.get("database", "port", fallback="3306")),
'OPTIONS': {
'charset': 'utf8mb4',
},

View file

@ -42,7 +42,7 @@ typing_extensions==4.1.1
uritemplate==4.1.1
urllib3==1.26.18
zipp==3.6.0
bip329==0.0.3
bip329==1.0.0
pymempool==0.0.5
django-datatables-view==1.20.0
django-money==3.3

View file

@ -9,6 +9,7 @@ services:
- MYSQL_USER=ulabelbase
- MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
- MYSQL_PASSWORD=$MYSQL_PASSWORD
- MYSQL_HOST=labelbase_mysql
ports:
- "3306:3306"
volumes:
@ -39,6 +40,8 @@ services:
- MYSQL_DATABASE=labelbase
- MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
- MYSQL_PASSWORD=$MYSQL_PASSWORD
- MYSQL_HOST=labelbase_mysql
- MYSQL_PORT=3306
command: /app/run.sh
labelbase_nginx:
build:

View file

@ -1,3 +1,11 @@
FROM nginx:latest
# Use official nginx image with explicit platform support
FROM --platform=$BUILDPLATFORM nginx:alpine
COPY nginx.conf /etc/nginx/
# Copy nginx configuration
COPY nginx.conf /etc/nginx/nginx.conf
# Expose port 8080
EXPOSE 8080
# Use the default nginx entrypoint
CMD ["nginx", "-g", "daemon off;"]