-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added new docker compose file for gitops
- Loading branch information
1 parent
7f03d79
commit ec846d3
Showing
3 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
version: '3' | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters