-
Notifications
You must be signed in to change notification settings - Fork 0
/
dc-swarm.yml
55 lines (51 loc) · 1.23 KB
/
dc-swarm.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# App Version: 2.4
version: '3.8' # Newer Docker Compose version. This is a deployment config for portainer with docker swarm. It pulls from the github repo.
volumes:
postgres_data:
driver: local
services:
postgres:
image: postgres:latest
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: Ash
POSTGRES_PASSWORD: Ketchum
POSTGRES_DB: pokeappdb
healthcheck:
test: ["CMD-SHELL", "pg_isready -U Ash"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
redis:
image: redis:latest
ports:
- target: 6379
published: 6379
protocol: tcp
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
pokeapp:
image: evilgenius13/pokeapp:v2.4
ports:
- target: 5000
published: 5000
protocol: tcp
environment:
SECRET_KEY: pokemon
DATABASE_URL: postgresql://Ash:Ketchum@postgres:5432/pokeappdb
REDIS_URL: redis://redis:6379/0
depends_on:
- postgres
- redis
command: /app/start-pokeapp.sh
deploy:
replicas: 3
update_config:
parallelism: 1
delay: 10s