Fixes #1: Vorschlag für ein docker-compose
This commit is contained in:
42
templates/docker-compose.yml.j2
Normal file
42
templates/docker-compose.yml.j2
Normal file
@ -0,0 +1,42 @@
|
||||
# Deployed through Ansible
|
||||
version: '3'
|
||||
services:
|
||||
ki_db:
|
||||
image: {{ ki_db_image }}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- "MYSQL_ROOT_PASSWORD={{ ki_db_root_password }}"
|
||||
- "MYSQL_DATABASE=ki"
|
||||
- "MYSQL_USER=ki"
|
||||
- "MYSQL_PASSWORD={{ ki_db_password }}"
|
||||
volumes:
|
||||
- ki_db:/var/lib/mysql/
|
||||
networks:
|
||||
- ki
|
||||
ki_backend:
|
||||
image: {{ ki_backend_image }}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- "SQLALCHEMY_DATABASE_URI=mariadb+pymysql://ki:{{ ki_db_password }}@ki_db:3306/ki"
|
||||
- "FLASK_ENV=development"
|
||||
- "KI_LOGLEVEL=10"
|
||||
- "KI_AUTH=file"
|
||||
- "CORS_ORIGINS={{ ki_frontend_uri }}"
|
||||
ports:
|
||||
- "127.0.0.1:{{ ki_backend_port }}:5000"
|
||||
volumes:
|
||||
- ki_data:/app/data/
|
||||
networks:
|
||||
- ki
|
||||
ki_frontend:
|
||||
image: {{ ki_frontend_image }}
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "127.0.0.1:{{ ki_frontend_port }}:80"
|
||||
volumes:
|
||||
- ./data/frontend.js:/usr/share/nginx/html/config.js
|
||||
networks:
|
||||
- default
|
||||
networks:
|
||||
default: {}
|
||||
ki: {}
|
Reference in New Issue
Block a user