-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdc-ops.yml
45 lines (41 loc) · 1.04 KB
/
dc-ops.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
version: '3' # This is a deployment config for portainer. 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:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
pokeapp:
build: .
ports:
- "5000:5000"
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 # Script command to watch for postgres and redis to be ready before starting the app