1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-11-27 22:53:00 +00:00
kiwi-scp/example/hello_world/docker-compose.yml

56 lines
1.2 KiB
YAML
Raw Normal View History

version: "2"
networks:
# reachable from outside
default:
driver: bridge
# interconnects projects
2020-08-13 12:26:09 +00:00
kiwi_hub:
external:
2020-08-20 13:29:07 +00:00
name: ${KIWI_HUB_NAME}
services:
2020-08-24 12:49:39 +00:00
greeter:
2021-10-28 13:53:32 +00:00
# simple loop producing (rather boring) logs
image: alpine:latest
2020-08-11 10:33:21 +00:00
command: sh -c 'LOOP=1; while :; do echo Hello World "$$LOOP"; LOOP=$$(($$LOOP + 1)); sleep 10; done'
2020-08-24 12:49:39 +00:00
web:
2021-10-28 13:53:32 +00:00
# basic webserver listening on localhost:8080
2020-08-24 12:49:39 +00:00
build: web
restart: unless-stopped
ports:
- "8080:80"
db:
2021-10-28 13:53:32 +00:00
# internal mariadb (mysql) instance with persistent storage
2020-08-24 12:49:39 +00:00
image: mariadb:10
restart: unless-stopped
networks:
- kiwi_hub
environment:
MYSQL_ROOT_PASSWORD: changeme
volumes:
2022-02-21 22:35:48 +00:00
- "${KIWI_PROJECT}/db:/var/lib/mysql"
2020-08-24 12:49:39 +00:00
adminer:
2021-10-28 13:53:32 +00:00
# admin interface for databases
2020-08-24 12:49:39 +00:00
image: adminer:standalone
restart: unless-stopped
2020-08-20 13:29:07 +00:00
networks:
- default
- kiwi_hub
2020-08-24 12:49:39 +00:00
depends_on:
- db
ports:
- "8081:8080"
2020-08-20 13:29:07 +00:00
2020-08-24 12:49:39 +00:00
another-web:
2022-02-21 22:35:48 +00:00
# Another webserver just to show off the ${KIWI_CONFIG} variable
2020-08-24 12:49:39 +00:00
image: nginx:stable-alpine
restart: unless-stopped
ports:
- "8082:80"
volumes:
2022-02-21 22:35:48 +00:00
- "${KIWI_CONFIG}/html/index.html:/usr/share/nginx/html/index.html:ro"