40 lines
881 B
YAML
40 lines
881 B
YAML
x-mapped-user-container: &x-mapped-user-container
|
|
args:
|
|
- UID=1000
|
|
- GID=1000
|
|
|
|
services:
|
|
nginx:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile-nginx.dockerfile
|
|
<<: *x-mapped-user-container
|
|
ports:
|
|
- '8000:80'
|
|
volumes:
|
|
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
|
|
- ./:/var/www/html/
|
|
php-fpm:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile-fpm.dockerfile
|
|
<<: *x-mapped-user-container
|
|
volumes:
|
|
- ./:/var/www/html/
|
|
environment:
|
|
- REDIS_HOST=redis
|
|
- REDIS_PORT=6379
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
dns:
|
|
- 8.8.8.8
|
|
|
|
redis:
|
|
image: redis:7.0
|
|
ports:
|
|
- "6379:6379"
|
|
command: [ "redis-server", "--save", "60", "1", "--loglevel", "warning" ]
|
|
healthcheck:
|
|
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|