Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for the docker dev env #3011

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 @@

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
Loading