mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
91 lines
1.9 KiB
YAML
91 lines
1.9 KiB
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
image: invoiceninja/invoiceninja-debian:${TAG:-latest}
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ./.env
|
|
volumes:
|
|
# - ./php/php.ini:/usr/local/etc/php/conf.d/invoiceninja.ini:ro
|
|
# - ./php/php-fpm.conf:/usr/local/etc/php-fpm.d/invoiceninja.conf:ro
|
|
# - ./supervisor/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf:ro
|
|
- app_public:/var/www/html/public
|
|
- app_storage:/var/www/html/storage
|
|
networks:
|
|
- app-network
|
|
depends_on:
|
|
mysql:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- ./nginx:/etc/nginx/conf.d:ro
|
|
- app_public:/var/www/html/public:ro
|
|
- app_storage:/var/www/html/storage:ro
|
|
networks:
|
|
- app-network
|
|
depends_on:
|
|
app:
|
|
condition: service_healthy
|
|
|
|
mysql:
|
|
image: mysql:8
|
|
restart: unless-stopped
|
|
environment:
|
|
MYSQL_DATABASE: ${DB_DATABASE}
|
|
MYSQL_USER: ${DB_USERNAME}
|
|
MYSQL_PASSWORD: ${DB_PASSWORD}
|
|
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
|
volumes:
|
|
- mysql_data:/var/lib/mysql
|
|
networks:
|
|
- app-network
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD",
|
|
"mysqladmin",
|
|
"ping",
|
|
"-h",
|
|
"localhost",
|
|
"-u${MYSQL_USER}",
|
|
"-p${MYSQL_PASSWORD}",
|
|
]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:alpine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- redis_data:/data
|
|
networks:
|
|
- app-network
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
app_public:
|
|
driver: local
|
|
app_storage:
|
|
driver: local
|
|
mysql_data:
|
|
driver: local
|
|
redis_data:
|
|
driver: local
|