Skip to content

Instantly share code, notes, and snippets.

@Shogan
Last active Aug 28, 2021
Embed
What would you like to do?
Example docker-compose services to run on ARM Graviton2 based instances under Docker with Traefik v2 routing. See https://www.shogan.co.uk/how-tos/minimal-cost-web-hosting-with-spot-graviton2-efs-traefik-lets-encrypt/ for more info.
version: "3"
networks:
web:
external: true
internal:
external: false
services:
blog:
image: docker.io/arm64v8/wordpress:5.5.3-apache
environment:
WORDPRESS_DB_PASSWORD: ${EXAMPLE}
labels:
- traefik.http.routers.blog.rule=Host(`wordpressblog.example.com`)
- traefik.http.routers.blog.tls=true
- traefik.http.routers.blog.tls.certresolver=lets-encrypt
- traefik.port=80
networks:
- internal
- web
depends_on:
- mysql
mysql:
image: biarms/mysql:5.7.30
environment:
MYSQL_ROOT_PASSWORD: ${EXAMPLE}
MYSQL_ROOT_HOST: "%"
networks:
- internal
labels:
- traefik.enable=false
adminer:
image: arm64v8/adminer:4.7.7-standalone
labels:
- traefik.http.routers.adminer.rule=Host(`adminer.example.com`)
- traefik.http.routers.adminer.tls=true
- traefik.http.routers.adminer.tls.certresolver=lets-encrypt
- traefik.port=8080
networks:
- internal
- web
depends_on:
- mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment