Skip to content

Commit

Permalink
update docker container to nextcloud 30, add sqlite3 useful do check …
Browse files Browse the repository at this point in the history
…the db

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
  • Loading branch information
Grotax committed Dec 30, 2024
1 parent 812a219 commit 8907cee
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# https://hub.docker.com/_/nextcloud/
FROM nextcloud:29-apache
FROM nextcloud:30-apache
#FROM ghcr.io/pbek/nextcloud-docker-pre-apache:latest
#FROM ghcr.io/digital-blueprint/nextcloud-docker-pre-apache:latest

COPY entrypoint.sh /

RUN apt-get update && apt-get install -y sqlite3
RUN deluser www-data
RUN useradd -u 1000 -ms /bin/bash www-data
RUN usermod -a -G www-data www-data
Expand Down
30 changes: 30 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ docker compose up
Afterward you should be able to open <http://localhost:8081/index.php/apps/news> (admin/admin) to
log in to your Nextcloud instance.

Press Ctrl+C to stop the container.

## Check nextcloud.log

For debugging, you can show the `nextcloud.log`:
Expand All @@ -20,6 +22,34 @@ make show-log

There also is a [logging web interface](http://localhost:8081/index.php/settings/admin/logging).

## Create shell in docker container

To check if the container is still running:
```bash
docker ps
```
It should show something like this:
```bash
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a1b2c3d4e5f6 nextcloud-news-app "docker-entrypoint.…" 2 hours ago Up 2 hours 0.0.0.0:8081->80/tcp nextcloud-news-app
```
To open a shell run
``` bash
docker exec -it nextcloud-news-app /bin/bash
```

To exit press Ctrl+D

### Inside the shell

Use sqlite3 to open the db

```bash
sqlite3 data/mydb.db
```

More on the sqlite3 cli: https://www.sqlite.org/cli.html

Check failure on line 51 in docker/README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'cli'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'cli'?", "location": {"path": "docker/README.md", "range": {"start": {"line": 51, "column": 21}}}, "severity": "ERROR"}

## Tip

In case something is broken try to reset the container:
Expand Down
1 change: 1 addition & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: nextcloud-news

services:
app:
container_name: nextcloud-news-app
build: .
ports:
- 8081:80
Expand Down

0 comments on commit 8907cee

Please sign in to comment.