2016-07-07 12:23:59 +00:00
|
|
|
version: '2'
|
|
|
|
services:
|
|
|
|
cache:
|
|
|
|
image: redis:alpine
|
|
|
|
volumes:
|
|
|
|
- redis_data:/data
|
|
|
|
|
|
|
|
db:
|
|
|
|
image: postgres
|
|
|
|
environment:
|
|
|
|
POSTGRES_PASSWORD: 'pokemon'
|
|
|
|
POSTGRES_USER: 'ash'
|
|
|
|
POSTGRES_DB: 'pokeapi'
|
|
|
|
volumes:
|
|
|
|
- pg_data:/var/lib/postgresql/data
|
|
|
|
|
|
|
|
app:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: ./Resources/docker/app/Dockerfile
|
|
|
|
volumes:
|
2019-01-04 14:36:29 +00:00
|
|
|
- .:/code
|
2016-07-07 12:23:59 +00:00
|
|
|
links:
|
|
|
|
- db
|
|
|
|
- cache
|
2019-01-04 14:36:29 +00:00
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- cache
|
2016-07-07 12:23:59 +00:00
|
|
|
|
|
|
|
web:
|
|
|
|
build:
|
|
|
|
context: ./Resources
|
|
|
|
dockerfile: ./docker/web/Dockerfile
|
|
|
|
ports:
|
|
|
|
- "80:80"
|
|
|
|
- "443:443"
|
|
|
|
volumes_from:
|
|
|
|
- app:ro
|
|
|
|
links:
|
|
|
|
- app
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
pg_data:
|
|
|
|
redis_data:
|