changed structure for docker usage
This commit is contained in:
58
compose.yml
Normal file
58
compose.yml
Normal file
@@ -0,0 +1,58 @@
|
||||
version: "3"
|
||||
services:
|
||||
app:
|
||||
container_name: python-app
|
||||
command: python -m uvicorn app.main:app --host 0.0.0.0 --port 80
|
||||
biuld:
|
||||
context: .
|
||||
dockerfile: Dockerfile_app
|
||||
volumes:
|
||||
- ./app:/python
|
||||
- ./unizeug:/unizeug
|
||||
ports:
|
||||
- 80:80
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
APP_LOG_PATH: /python/app.log
|
||||
APP_ROOT_PATH: /python
|
||||
UNIZEUG_PATH: /unizeug
|
||||
DB_HOST: db
|
||||
DB_USER: app
|
||||
DB_PASSWORD: DBPassword
|
||||
DB_DATABASE: Unizeug
|
||||
TZ: "Europe/Vienna"
|
||||
|
||||
depends_on:
|
||||
- db
|
||||
- scaner
|
||||
db:
|
||||
container_name: db
|
||||
image: mariadb
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MARAIDB_ROOT_PASSWORD: DBPassword
|
||||
MARIADB_USER: app
|
||||
MARIADB_PASSWORD: DBPassword
|
||||
MARIADB_DATABASE: Unizeug
|
||||
TZ: "Europe/Vienna"
|
||||
volumes:
|
||||
- ./mariadb:/var/lib/mysql
|
||||
scaner:
|
||||
container_name: python-scaner
|
||||
command: python /python/init.py
|
||||
biuld:
|
||||
context: .
|
||||
dockerfile: Dockerfile_scaner
|
||||
volumes:
|
||||
- ./app:/python
|
||||
- ./unizeug
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
UNIZEUG_PATH: /unizeug
|
||||
DB_HOST: db
|
||||
DB_USER: app
|
||||
DB_PASSWORD: DBPassword
|
||||
DB_DATABASE: Unizeug
|
||||
TZ: "Europe/Vienna"
|
||||
depends_on:
|
||||
- db
|
||||
Reference in New Issue
Block a user