-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (61 loc) · 1.72 KB
/
docker-compose.yml
File metadata and controls
63 lines (61 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
services:
postgres:
image: postgres:16-alpine
container_name: vibereader-postgres
environment:
POSTGRES_DB: vibereader
POSTGRES_USER: vibereader
POSTGRES_PASSWORD: vibereader
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U vibereader"]
interval: 10s
timeout: 5s
retries: 5
vibereader:
build: .
container_name: vibereader
ports:
- "9999:8000"
volumes:
# Allow for code changes during development
- ./src:/var/www/html/src
- ./views:/var/www/html/views
- ./assets:/var/www/html/assets
- ./index.php:/var/www/html/index.php
- ./worker.php:/var/www/html/worker.php
- ./scheduler.php:/var/www/html/scheduler.php
- ./scripts:/var/www/html/scripts
- ./phpstan.neon:/var/www/html/phpstan.neon
- ./.php-cs-fixer.php:/var/www/html/.php-cs-fixer.php
- ./composer.json:/var/www/html/composer.json
- ./composer.lock:/var/www/html/composer.lock
environment:
- PHP_CLI_SERVER_WORKERS=4
- DB_TYPE=pgsql
- DB_HOST=postgres
- DB_PORT=5432
- DB_NAME=vibereader
- DB_USER=vibereader
- DB_PASSWORD=vibereader
- JOBS_ENABLED=1
- JOBS_WORKER_SLEEP=5
- JOBS_MAX_ATTEMPTS=3
- JOBS_CLEANUP_DAYS=7
- FEED_RETENTION_DAYS=90
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "php", "-r", "file_get_contents('http://localhost:8000') || exit(1)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
postgres_data: