-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
36 lines (36 loc) · 963 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
version: "3.9"
services:
ansible:
build: docker/
container_name: "ansible"
command: "sleep infinity"
links:
- "playground:playground"
volumes:
- $PWD/config:/etc/ansible
- $PWD/keys/ansible_key:/root/.ssh/id_rsa:ro
traefik:
image: "traefik:v2.6"
container_name: "traefik"
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
playground:
build:
context: docker/
dockerfile: Dockerfile_playground
deploy:
replicas: 1
volumes:
- $PWD/keys/ansible_key.pub:/root/.ssh/authorized_keys
labels:
- "traefik.enable=true"
- "traefik.http.routers.playground.rule=Host(`localhost`)"
- "traefik.http.routers.playground.entrypoints=web"