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

Devcontainer #1311

Merged
merged 2 commits into from
Oct 12, 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
10 changes: 8 additions & 2 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ After the container starts up, follow these steps:
- Username: `admin`
- Password: `admin`

Note: MariaDB is set up automatically (db=`nextcloud`, user=`nextcloud`, password=`nextcloud`)
Note: MariaDB is set up automatically (db=`nextcloud`, user=`nextcloud`, password=`nextcloud`); Adminer for graphical database management is available on port 8080.

To run OCC commands in the container, use the following command:

Expand All @@ -21,4 +21,10 @@ To watch changes in UI build:

```bash
make watch-js
```
```

Note: Nextcloud automatically caches app assets (including javascript) based on the version number, so you'll have to force-reload your browser window. Alternatively, to ensure caches are invalidated, you can:

1. Change the version number in `appinfo/info.xml`
2. Build the app using `make watch-js` (or `make build-js`/`make build-js-production` for a static build)
3. Inform nextcloud of the upgrade via `sudo -E -u www-data php /var/www/html/occ upgrade`
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [80],
"forwardPorts": [80,8080],
"postCreateCommand": "bash .devcontainer/postCreate.sh",
// "postStartCommand": "make watch-js",
// Configure tool-specific properties.
Expand Down
8 changes: 8 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ services:
- PHP_MEMORY_LIMIT=1G
- PHP_UPLOAD_LIMIT=1G
- DEBIAN_FRONTEND=noninteractive
ports:
- 80:80
- 8080:8080

db:
image: mariadb:11
Expand All @@ -42,6 +45,11 @@ services:
- MARIADB_AUTO_UPGRADE=1
- MARIADB_INITDB_SKIP_TZINFO=1

adminer:
image: adminer
restart: always
network_mode: service:nextcloud

redis:
image: redis:alpine
pull_policy: always
Expand Down