micro/example/compose.yml

34 lines
1.0 KiB
YAML

version: '3'
services:
micro:
image: sylver/micro:main
restart: unless-stopped
volumes:
- $PWD/.microrc.yaml:/usr/src/micro/.microrc.yaml
- $PWD/data:/data
# uncomment this if you dont care about https, then comment out the proxy service
# ports:
# - 80:3000
postgres:
image: postgres:12-alpine
restart: unless-stopped
environment:
# leaving this as default should be fine as postgres will only ever be exposed to services
# in this compose file, but you might still want to consider changing it to something more secure.
- POSTGRES_PASSWORD=youshallnotpass
- POSTGRES_USER=micro
- POSTGRES_DB=micro
volumes:
- $PWD/.pg-data:/var/lib/postgresql/data
# comment this out if you dont care about https, then uncomment the above ports
proxy:
image: caddy:2-alpine
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- $PWD/.caddy-data:/data
- $PWD/.caddy-config:/config
- $PWD/Caddyfile:/etc/caddy/Caddyfile