Skip to content

Commit 096ee73

Browse files
committed
adds readonly user
1 parent 86baa30 commit 096ee73

3 files changed

Lines changed: 29 additions & 5 deletions

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM clickhouse/clickhouse-server:24.9
1+
FROM docker.io/library/clickhouse:25.1
22
LABEL version="0.2.0"
33

44
COPY ./table_data/ /docker-entrypoint-initdb.d/
5+
COPY ./readonly.xml /etc/clickhouse-server/users.d/

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ $ docker run -d --name fruity-local -p 8123:8123 -p 9000:9000 --ulimit nofile=26
2121

2222
## For use in an ARM mac
2323
Add a platform flag on the Dockerfile
24+
```diff
25+
-FROM docker.io/library/clickhouse:25.1
26+
+FROM --platform=linux/amd64 docker.io/library/clickhouse:25.1
2427
```
25-
FROM --platform=linux/amd64 yandex/clickhouse-server:latest
26-
COPY . /tmp/
27-
COPY populate.sh /docker-entrypoint-initdb.d/
28-
```

readonly.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<clickhouse>
2+
<profiles>
3+
<readonly>
4+
<readonly>1</readonly>
5+
<joined_subquery_requires_alias>0</joined_subquery_requires_alias>
6+
<max_execution_time>600</max_execution_time>
7+
<constraints>
8+
<use_query_cache>
9+
<changeable_in_readonly/>
10+
</use_query_cache>
11+
</constraints>
12+
</readonly>
13+
</profiles>
14+
15+
<users>
16+
<readonly>
17+
<password></password>
18+
<networks>
19+
<ip>::/0</ip>
20+
</networks>
21+
<profile>readonly</profile>
22+
</readonly>
23+
</users>
24+
</clickhouse>

0 commit comments

Comments
 (0)