Docker
This commit is contained in:
@ -2,16 +2,23 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
api:
|
api:
|
||||||
|
profiles:
|
||||||
|
- api
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: php
|
image: php
|
||||||
build:
|
build:
|
||||||
context: api
|
context: api
|
||||||
env_file: .env
|
env_file:
|
||||||
|
- .env
|
||||||
|
- .api.env
|
||||||
|
- .python.key
|
||||||
volumes:
|
volumes:
|
||||||
- ./api/:/app/
|
- ./api/:/app/
|
||||||
- ./api/php.ini:/usr/local/etc/php/conf.d/php.ini
|
- ./api/php.ini:/usr/local/etc/php/conf.d/php.ini
|
||||||
- ./logs/api/php/:/var/log/php/
|
- ./logs/api/php/:/var/log/php/
|
||||||
api-proxy:
|
api-proxy:
|
||||||
|
profiles:
|
||||||
|
- api
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: nginx
|
image: nginx
|
||||||
ports:
|
ports:
|
||||||
@ -21,25 +28,37 @@ services:
|
|||||||
- ./logs/api/:/var/log/nginx/
|
- ./logs/api/:/var/log/nginx/
|
||||||
- ./api/:/app/
|
- ./api/:/app/
|
||||||
db:
|
db:
|
||||||
|
profiles:
|
||||||
|
- api
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: mariadb
|
image: mariadb
|
||||||
env_file: .env
|
env_file: .env
|
||||||
volumes:
|
volumes:
|
||||||
- contabilidad_data:/var/lib/mysql
|
- contabilidad_data:/var/lib/mysql
|
||||||
adminer:
|
adminer:
|
||||||
|
profiles:
|
||||||
|
- api
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: adminer
|
image: adminer
|
||||||
ports:
|
ports:
|
||||||
- "9002:8080"
|
- "9002:8080"
|
||||||
|
|
||||||
ui:
|
ui:
|
||||||
|
profiles:
|
||||||
|
- ui
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: php-ui
|
image: php-ui
|
||||||
|
env_file:
|
||||||
|
- .api.env
|
||||||
build:
|
build:
|
||||||
context: ui
|
context: ui
|
||||||
volumes:
|
volumes:
|
||||||
- ./ui/:/app/
|
- ./ui/:/app/
|
||||||
|
- ./ui/php.ini:/usr/local/etc/php/conf.d/php.ini
|
||||||
|
- ./logs/ui/php/:/var/log/php/
|
||||||
ui-proxy:
|
ui-proxy:
|
||||||
|
profiles:
|
||||||
|
- ui
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: nginx
|
image: nginx
|
||||||
ports:
|
ports:
|
||||||
@ -50,9 +69,15 @@ services:
|
|||||||
- ./ui/:/app/
|
- ./ui/:/app/
|
||||||
|
|
||||||
python:
|
python:
|
||||||
|
profiles:
|
||||||
|
- python
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build:
|
build:
|
||||||
context: ./python
|
context: ./python
|
||||||
|
env_file:
|
||||||
|
- .python.key
|
||||||
|
ports:
|
||||||
|
- "9003:5000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./python/src/:/app/src/
|
- ./python/src/:/app/src/
|
||||||
- ./python/config/:/app/config/
|
- ./python/config/:/app/config/
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
from threading import Thread
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
|
|
||||||
class Worker(Thread):
|
|
||||||
def __init__(self, settings):
|
|
||||||
self.settings = settings
|
|
||||||
|
|
||||||
def run():
|
|
||||||
while True:
|
|
||||||
if self.stop_event.isSet():
|
|
||||||
break
|
|
Reference in New Issue
Block a user