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
|
FROM python:3.12-alpine
|
||||||
|
|
||||||
COPY requirements.txt /
|
COPY requirements.txt /
|
||||||
COPY . .
|
|
||||||
RUN set -ex ;\
|
RUN set -ex ;\
|
||||||
apk add --no-cache musl-dev mariadb-connector-c-dev gcc ;\
|
apk add --no-cache musl-dev mariadb-connector-c-dev gcc ;\
|
||||||
pip3 install -r /requirements.txt ;\
|
pip3 install -r /requirements.txt ;\
|
||||||
|
|||||||
@@ -7,24 +7,28 @@ services:
|
|||||||
- MYSQL_DATABASE=touchh
|
- MYSQL_DATABASE=touchh
|
||||||
- MYSQL_USER=touchh
|
- MYSQL_USER=touchh
|
||||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-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:
|
volumes:
|
||||||
- ./var/mysql:/var/lib/mysql
|
- ./var/mysql:/var/lib/mysql
|
||||||
|
|
||||||
bot:
|
bot:
|
||||||
&py_service
|
&py_service
|
||||||
build: .
|
build: .
|
||||||
image: touchh-py
|
image: touchh-py
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
command: ['python3', 'manage.py', 'run_bot']
|
command: ['python3', 'manage.py', 'run_bot']
|
||||||
depends_on: ['db']
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
stop_signal: SIGINT
|
stop_signal: SIGINT
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/app
|
- .:/app
|
||||||
|
|
||||||
scheduler:
|
scheduler:
|
||||||
<<: *py_service
|
<<: *py_service
|
||||||
command: ['python3', 'manage.py', 'start_scheduler']
|
command: ['python3', 'manage.py', 'start_scheduler']
|
||||||
|
|
||||||
web:
|
web:
|
||||||
<<: *py_service
|
<<: *py_service
|
||||||
command: ['python3', 'manage.py', 'runserver', '0.0.0.0:8000']
|
command: ['python3', 'manage.py', 'runserver', '0.0.0.0:8000']
|
||||||
|
|||||||
Reference in New Issue
Block a user