You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.2 KiB
59 lines
1.2 KiB
version: "3.9" |
|
services: |
|
app: |
|
image: php82-app-img |
|
build: |
|
context: .. |
|
dockerfile: docker/Dockerfile |
|
target: php-fpm |
|
container_name: php82-app |
|
restart: unless-stopped |
|
volumes: |
|
- ../:/var/www/html:cached |
|
networks: |
|
- app-network |
|
healthcheck: |
|
# The container is ready when port 9000 is open |
|
test: ["CMD", "sh", "-c", "echo | nc -w 5 127.0.0.1 9000"] |
|
interval: 10s |
|
timeout: 5s |
|
retries: 10 |
|
|
|
scheduler: |
|
image: php82-app-img |
|
build: |
|
context: .. |
|
dockerfile: docker/Dockerfile |
|
target: php-fpm |
|
container_name: php82-scheduler |
|
restart: unless-stopped |
|
entrypoint: ["php", "/var/www/html/cli/scheduler.php"] |
|
volumes: |
|
- ../:/var/www/html:cached |
|
depends_on: |
|
app: |
|
condition: service_healthy |
|
networks: |
|
- app-network |
|
|
|
nginx: |
|
image: php82-nginx-img |
|
build: |
|
context: .. |
|
dockerfile: docker/Dockerfile |
|
target: nginx |
|
container_name: php82-nginx |
|
restart: unless-stopped |
|
ports: |
|
- "50080:80" |
|
volumes: |
|
- ../:/var/www/html:cached |
|
depends_on: |
|
app: |
|
condition: service_healthy |
|
networks: |
|
- app-network |
|
|
|
networks: |
|
app-network: |
|
driver: bridge |