Merge pull request 'zorn-dev' (#8) from zorn-dev into PMSManager_refactor
Reviewed-on: SmartSolTech/touchh_bot#8
This commit is contained in:
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@@ -0,0 +1 @@
|
||||
/var
|
||||
@@ -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 ;\
|
||||
|
||||
@@ -7,24 +7,28 @@ services:
|
||||
- MYSQL_DATABASE=touchh
|
||||
- MYSQL_USER=touchh
|
||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-touchh}
|
||||
healthcheck:
|
||||
test: mariadb -utouchh -p${MYSQL_PASSWORD:-touchh} -e 'SELECT 1;' touchh
|
||||
interval: 1s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
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']
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
stop_signal: SIGINT
|
||||
volumes:
|
||||
- ./:/app
|
||||
|
||||
- .:/app
|
||||
scheduler:
|
||||
<<: *py_service
|
||||
command: ['python3', 'manage.py', 'start_scheduler']
|
||||
|
||||
web:
|
||||
<<: *py_service
|
||||
command: ['python3', 'manage.py', 'runserver', '0.0.0.0:8000']
|
||||
|
||||
Reference in New Issue
Block a user