Skip to content

Commit

Permalink
Merge pull request #1311 from jovanbulck/devcontainer
Browse files Browse the repository at this point in the history
Devcontainer
  • Loading branch information
pulsejet authored Oct 12, 2024
2 parents 8128aba + 0eb1e7b commit 2648635
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
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

0 comments on commit 2648635

Please sign in to comment.