48 lines
819 B
YAML
48 lines
819 B
YAML
|
# -*- coding: utf-8 mode: yaml -*- vim:sw=2:sts=2:et:ai:si:sta:fenc=utf-8
|
||
|
|
||
|
services:
|
||
|
db:
|
||
|
image: mariadb:10
|
||
|
environment:
|
||
|
MARIADB_ROOT_PASSWORD: admin
|
||
|
MARIADB_DATABASE: mydb
|
||
|
MARIADB_USER: myuser
|
||
|
MARIADB_PASSWORD: pass
|
||
|
volumes:
|
||
|
- data:/var/lib/mysql
|
||
|
- ./initdb:/docker-entrypoint-initdb.d
|
||
|
networks:
|
||
|
- int
|
||
|
deploy:
|
||
|
update_config:
|
||
|
order: stop-first
|
||
|
placement:
|
||
|
constraints:
|
||
|
- node.hostname == sw1
|
||
|
|
||
|
adminer:
|
||
|
image: adminer
|
||
|
networks:
|
||
|
- int
|
||
|
|
||
|
web:
|
||
|
build: .
|
||
|
image: sw1.self:5000/app-web
|
||
|
volumes:
|
||
|
- logs:/var/log/apache2
|
||
|
- ./public:/var/www/html
|
||
|
networks:
|
||
|
- int
|
||
|
- proxy
|
||
|
deploy:
|
||
|
replicas: 3
|
||
|
|
||
|
volumes:
|
||
|
data:
|
||
|
logs:
|
||
|
|
||
|
networks:
|
||
|
int:
|
||
|
proxy:
|
||
|
external: true
|