-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
155 lines (150 loc) · 4.24 KB
/
docker-compose.yml
File metadata and controls
155 lines (150 loc) · 4.24 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
services:
## MariaDB and Redis (optional)
mysqldb:
image: mysql:9
container_name: loops-db
restart: unless-stopped
env_file:
- .env
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
volumes:
- ./mysqldb-9-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-u", "root", "-p$$MYSQL_ROOT_PASSWORD"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
networks:
- loops-network
redis:
image: redis/redis-stack-server:7.4.0-v8
container_name: loops-redis
restart: unless-stopped
env_file:
- .env
environment:
#REDIS_ARGS: "--save 3600 1000 --appendonly yes --requirepass ${REDIS_PASSWORD}" ## Save Redis to disk every hour & Write the logs to disk using AOF
REDIS_ARGS: "--appendonly yes --requirepass ${REDIS_PASSWORD}"
volumes:
- ./redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
start_period: 10s
networks:
- loops-network
## Pixelfed containers - App (Web/API), Horizon Queue, Scheduled task.
loops:
build:
context: .
dockerfile: Dockerfile
container_name: loops-app
restart: unless-stopped
ports:
- "8080:8080"
env_file:
- .env
environment:
# SSL Configuration (handled by reverse proxy)
SSL_MODE: "off"
# PHP Configuration
PHP_POST_MAX_SIZE: "100M"
PHP_UPLOAD_MAX_FILE_SIZE: "100M"
PHP_OPCACHE_ENABLE: "1"
PHP_MEMORY_LIMIT: "512M"
# Laravel Auto-run Configuration
AUTORUN_ENABLED: "true"
AUTORUN_LARAVEL_MIGRATION: "true"
AUTORUN_LARAVEL_MIGRATION_ISOLATION: "true"
AUTORUN_LARAVEL_STORAGE_LINK: "true"
AUTORUN_LARAVEL_EVENT_CACHE: "true"
AUTORUN_LARAVEL_ROUTE_CACHE: "true"
AUTORUN_LARAVEL_VIEW_CACHE: "true"
AUTORUN_LARAVEL_CONFIG_CACHE: "true"
volumes:
- ./storage:/var/www/html/storage
- ./bootstrap/cache:/var/www/html/bootstrap/cache
depends_on:
- mysqldb
- redis
networks:
- loops-network
horizon:
build:
context: .
dockerfile: Dockerfile
container_name: loops-horizon
restart: unless-stopped
command: ["php", "artisan", "horizon"]
env_file:
- .env
environment:
# Laravel Auto-run Configuration
AUTORUN_ENABLED: "false"
AUTORUN_LARAVEL_MIGRATION: "false"
AUTORUN_LARAVEL_MIGRATION_ISOLATION: "false"
AUTORUN_LARAVEL_STORAGE_LINK: "true"
AUTORUN_LARAVEL_EVENT_CACHE: "false"
AUTORUN_LARAVEL_ROUTE_CACHE: "false"
AUTORUN_LARAVEL_VIEW_CACHE: "false"
AUTORUN_LARAVEL_CONFIG_CACHE: "true"
PHP_POST_MAX_SIZE: "500M"
PHP_UPLOAD_MAX_FILE_SIZE: "500M"
PHP_OPCACHE_ENABLE: "1"
volumes:
- ./storage:/var/www/html/storage
- ./bootstrap/cache:/var/www/html/bootstrap/cache
depends_on:
- mysqldb
- redis
healthcheck:
test: ["CMD", "php", "artisan", "horizon:status"]
interval: 10s
timeout: 5s
retries: 3
networks:
- loops-network
scheduler:
build:
context: .
dockerfile: Dockerfile
container_name: loops-scheduler
restart: unless-stopped
command: ["php", "artisan", "schedule:work"]
stop_signal: SIGTERM
env_file:
- .env
environment:
# Laravel Auto-run Configuration
AUTORUN_ENABLED: "false"
AUTORUN_LARAVEL_MIGRATION: "false"
AUTORUN_LARAVEL_MIGRATION_ISOLATION: "false"
AUTORUN_LARAVEL_STORAGE_LINK: "true"
AUTORUN_LARAVEL_EVENT_CACHE: "false"
AUTORUN_LARAVEL_ROUTE_CACHE: "false"
AUTORUN_LARAVEL_VIEW_CACHE: "false"
AUTORUN_LARAVEL_CONFIG_CACHE: "true"
PHP_POST_MAX_SIZE: "500M"
PHP_UPLOAD_MAX_FILE_SIZE: "500M"
PHP_OPCACHE_ENABLE: "1"
volumes:
- ./storage:/var/www/html/storage
- ./bootstrap/cache:/var/www/html/bootstrap/cache
depends_on:
- mysqldb
- redis
healthcheck:
test: ["CMD", "healthcheck-schedule"]
start_period: 10s
networks:
- loops-network
networks:
loops-network:
driver: bridge