forked from yorknouse/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocal-docker-compose.yml
More file actions
166 lines (166 loc) · 3.97 KB
/
Copy pathlocal-docker-compose.yml
File metadata and controls
166 lines (166 loc) · 3.97 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
156
157
158
159
160
161
162
163
164
165
166
services:
caddy:
image: caddy:latest
container_name: caddy
restart: always
ports:
- "80:80"
- "419:419"
- "443:443"
volumes:
- caddy:/data
- php_app_data:/var/www/html/admin:ro
- ./docker/caddy/local/Caddyfile:/etc/caddy/Caddyfile
env_file:
- nouseprod-local.env
depends_on:
- php-container
- astro-container
- react-container
- phpmyadmin
networks:
default:
aliases:
- oauth.internal
valkey:
image: valkey/valkey:8-alpine
container_name: valkey
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- valkey_data:/data
command: [
"valkey-server",
"--appendonly", "yes",
"--maxmemory", "2gb",
"--maxmemory-policy", "allkeys-lru"
]
db:
image: mysql:9.5
command: --innodb-thread-concurrency=0 --sort_buffer_size=512K --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
container_name: db
volumes:
- db_data:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
- ./docker/mysql/mysql.conf:/etc/mysql/my.cnf
- ./docker/mysql/readonly.sql:/docker-entrypoint-initdb.d/readonly.sql
restart: always
environment:
- MYSQL_DATABASE=nouse
- MYSQL_ROOT_HOST=127.0.0.1
- MYSQL_USER=userDocker
- MYSQL_PASSWORD=passDocker
- MYSQL_ROOT_PASSWORD=rootPass
env_file:
- nouseprod-local.env
ports:
- "3306:3306"
php-container:
build:
context: .
dockerfile: Dockerfile.php-local-df
container_name: php-container
restart: always
expose:
- 9000
depends_on:
- db
environment:
- MYSQL_HOSTNAME=db
- MYSQL_DATABASE=nouse
- MYSQL_USERNAME=userDocker
- MYSQL_PASSWORD=passDocker
env_file:
- nouseprod-local.env
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- php_app_data:/var/www/html/admin:wo
react-container:
build:
context: .
dockerfile: Dockerfile.react-local-df
container_name: react-container
restart: always
depends_on:
- db
- valkey
env_file:
- nouseprod-local.env
ports:
- "3000:3000"
environment:
- REDIS_HOST=valkey
- REDIS_PORT=6379
- DATABASE_URL=mysql://userDocker:passDocker@db:3306/nouse
astro-container:
build:
context: .
dockerfile: Dockerfile.astro-local-df
args:
- PUBLIC_API_BASE_URL=http://react-container:3000
- PUBLIC_BASE_URL=http://localhost:3000
container_name: astro-container
restart: always
depends_on:
- react-container
env_file:
- nouseprod-local.env
expose:
- 4321
environment:
- PUBLIC_API_BASE_URL=http://react-container:3000
- PUBLIC_BASE_URL=http://localhost:3000
phpmyadmin:
image: phpmyadmin/phpmyadmin:5.2
container_name: phpmyadmin
environment:
- PMA_HOST=db
- PMA_PORT=3306
- PMA_ARBITRARY=1
- PMA_USER=userDocker
- PMA_PASSWORD=passDocker
restart: always
expose:
- 80
depends_on:
- db
volumes:
- /sessions
grafana:
image: grafana/grafana:12.3-ubuntu
container_name: grafana
restart: unless-stopped
volumes:
- ./docker/grafana/local/config:/etc/grafana
- ./docker/grafana/dashboards:/var/lib/grafana/dashboards
depends_on:
- db
ports:
- "3001:3001"
environment:
- GF_PLUGINS_PREINSTALL_SYNC=grafana-clock-panel
- GF_INSTANCE_NAME=Nouse
compressor:
image: ghcr.io/yorknouse/image-compressor:latest
restart: unless-stopped
depends_on:
- db
environment:
- MYSQL_HOSTNAME=db
- MYSQL_DATABASE=nouse
- MYSQL_USER=userDocker
- MYSQL_PASSWORD=passDocker
- SLEEP_TIME=60
env_file:
- nouseprod-local.env
volumes:
caddy:
external: true
name: website_caddy
php_app_data:
valkey_data:
db_data:
external: true
name: website_db_data