mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-10 20:37:15 +02:00
Solved other refactoring bugs and optimized docker role template
This commit is contained in:
19
templates/docker_role/templates/docker-compose.yml.j2.j2
Normal file
19
templates/docker_role/templates/docker-compose.yml.j2.j2
Normal file
@@ -0,0 +1,19 @@
|
||||
services:
|
||||
portfolio:
|
||||
build:
|
||||
context: {{docker_repository_path}}
|
||||
dockerfile: Dockerfile
|
||||
image: application-portfolio
|
||||
container_name: portfolio
|
||||
ports:
|
||||
- 127.0.0.1:{{ports.localhost.http[application_id]}}:5000
|
||||
volumes:
|
||||
- {{docker_repository_path}}app:/app
|
||||
restart: unless-stopped
|
||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||
healthcheck:
|
||||
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/localhost/5000 && echo -e 'GET / HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && cat <&3 | grep -q 'HTTP/1.1'"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
Reference in New Issue
Block a user