some fixes

This commit is contained in:
2024-12-28 13:39:34 +09:00
parent fa2c717711
commit 50fe26c4fe
3 changed files with 34 additions and 29 deletions

View File

@@ -75,6 +75,8 @@ services:
environment:
MYSQL_PASSWORD: touchh
command: ['python3', 'manage.py', 'runserver', '0.0.0.0:8000']
volumes:
- ./:/app
ports:
- port: 8000
depends_on:

View File

@@ -1,7 +1,7 @@
FROM python:3.12-alpine
COPY requirements.txt /
COPY . .
RUN set -ex ;\
apk add --no-cache musl-dev mariadb-connector-c-dev gcc ;\
pip3 install -r /requirements.txt ;\

View File

@@ -1,29 +1,32 @@
services:
db:
image: mariadb:11.6
restart: on-failure
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=1
- MYSQL_DATABASE=touchh
- MYSQL_USER=touchh
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-touchh}
volumes:
- ./var/mysql:/var/lib/mysql
bot:
&py_service
build: .
image: touchh-py
restart: on-failure
command: ['python3', 'manage.py', 'run_bot']
depends_on: ['db']
stop_signal: SIGINT
volumes:
- .:/app
scheduler:
<<: *py_service
command: ['python3', 'manage.py', 'start_scheduler']
web:
<<: *py_service
command: ['python3', 'manage.py', 'runserver', '0.0.0.0:8000']
ports:
- "${DOCKER_HTTP_BIND:-8000}:8000"
db:
image: mariadb:11.6
restart: on-failure
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=1
- MYSQL_DATABASE=touchh
- MYSQL_USER=touchh
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-touchh}
volumes:
- ./var/mysql:/var/lib/mysql
bot:
&py_service
build: .
image: touchh-py
restart: on-failure
command: ['python3', 'manage.py', 'run_bot']
depends_on: ['db']
stop_signal: SIGINT
volumes:
- ./:/app
scheduler:
<<: *py_service
command: ['python3', 'manage.py', 'start_scheduler']
web:
<<: *py_service
command: ['python3', 'manage.py', 'runserver', '0.0.0.0:8000']
ports:
- "${DOCKER_HTTP_BIND:-8000}:8000"