Skip to content

Commit

Permalink
Merge branch '0.1.6' into release_notes_016
Browse files Browse the repository at this point in the history
  • Loading branch information
seancolsen committed Mar 27, 2024
2 parents ed61ebe + 927d2de commit cb1f538
Show file tree
Hide file tree
Showing 7 changed files with 141 additions and 18 deletions.
44 changes: 44 additions & 0 deletions docs/docs/administration/debug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Debug Mathesar

For now, we only support turning on Debugging by using our special docker image. More methods will follow in future releases.

## Use the debugging Mathesar docker image

There is a debugging-enabled Mathesar docker image available at `mathesar/mathesar-debug` that is the same as the `mathesar/mathesar-prod` image, except that it has more debugging output available in the console where it's run, and it also produces more verbose errors in the browser when something goes wrong.

You can use this image to figure out (or to help the Mathesar team figure out) what's wrong if your Mathesar installation isn't working as expected. The procedure is to

1. Run Mathesar with the `mathesar/mathesar-debug` image, and then
1. Observe and report any additional output or clues to the Mathesar team.

### Docker Compose

Just replace the line

```
image: mathesar/mathesar-prod:latest
```

with

```
image: mathesar/mathesar-debug:latest
```

### Basic Mathesar docker image

If you are just trying the Mathesar Docker image directly as instructed in the [introduction](../index.md#try-locally), replace the command

```
docker run -it --name mathesar -p 8000:8000 mathesar/mathesar-prod:latest
```

with

```
docker run -it --name mathesar -p 8000:8000 mathesar/mathesar-debug:latest
```

### Other setups

The debugging docker image should work anywhere the production image works. This means you can just replace any pull or run of the image `mathesar/mathesar-prod:latest` with `mathesar/mathesar-debug:latest`.
3 changes: 2 additions & 1 deletion docs/docs/administration/upgrade/0.1.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,11 @@ If you installed Mathesar [from scratch](../../installation/build-from-source/in
!!! note
Your installation directory may be different from above if you used a different directory when installing Mathesar.

1. Pull the latest version from the repository
1. Pull version 0.1.4 from the repository

```
git pull https://github.com/mathesar-foundation/mathesar.git
git checkout 0.1.4
```

1. Update Python dependencies
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/administration/upgrade/0.1.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ docker compose -f /etc/mathesar/docker-compose.yml up --pull always -d

### For installations done from scratch

If you installed from scratch, the upgrade instructions are the same as [for 0.1.4](../upgrade/0.1.4.md#scratch), but you can skip Step 5 – you do not need to change the environment variables.
If you installed from scratch, the upgrade instructions are the same as [for 0.1.4](./0.1.4.md#scratch), except that you'll need to specify version 0.1.5 when pulling code from the repository in Step 2. You should also skip Step 5 – you do not need to change the environment variables.
86 changes: 86 additions & 0 deletions docs/docs/administration/upgrade/0.1.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Upgrade Mathesar to 0.1.6

### For installations using Docker Compose

If you have a Docker compose installation (including one from the guided script), run the command below:

```
docker compose -f /etc/mathesar/docker-compose.yml up --pull always -d
```

!!! warning "Your installation directory may be different"
You may need to change `/etc/mathesar/` in the command above if you chose to install Mathesar to a different directory.


### For installations done from scratch

If you installed Mathesar [from scratch](../../installation/build-from-source/index.md), then use these steps to upgrade your installation to 0.1.6.

1. Go to your Mathesar installation directory

```
cd xMATHESAR_INSTALLATION_DIRx
```

!!! note
Your installation directory may be different from above if you used a different directory when installing Mathesar.

1. Pull version 0.1.6 from the repository

```
git pull https://github.com/mathesar-foundation/mathesar.git
git checkout 0.1.6
```

1. Update Python dependencies

```
pip install -r requirements-prod.txt
```

1. Activate our virtual environment

```
source ./mathesar-venv/bin/activate
```

1. You can skip the following if you're upgrading from versions 0.1.4 and above.
- If you're upgrading from versions <= 0.1.3, update your environment variables according to the [the new configuration specification](../../configuration/env-variables.md#db).
- In particular, you must put the connection info for the internal DB into new `POSTGRES_*` variables. The `DJANGO_DATABASE_URL` variable is no longer supported.

1. Add the environment variables to the shell before running Django commands

```
export $(sudo cat .env)
```

1. Run Django migrations

```
python manage.py migrate
```

1. Download and extract frontend assets

```
wget https://github.com/mathesar-foundation/mathesar/releases/download/0.1.6/static_files.zip
unzip static_files.zip && mv static_files mathesar/static/mathesar && rm static_files.zip
```

1. Compile Mathesar translation files

```
python manage.py compilemessages
```

1. Update Mathesar functions on the database:

```
python -m mathesar.install --skip-confirm | tee /tmp/install.py.log
```

1. Restart the gunicorn server

```
systemctl restart gunicorn
```
13 changes: 2 additions & 11 deletions docs/docs/installation/build-from-source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ Then press <kbd>Enter</kbd> to customize this guide with your domain name.
CREATE DATABASE mathesar_django OWNER mathesar;
```

1. Now we let us create a database for storing your data.

```postgresql
CREATE DATABASE your_db_name OWNER mathesar;
```

1. Press <kbd>Ctrl</kbd>+<kbd>D</kbd> to exit the `psql` shell.


Expand Down Expand Up @@ -132,7 +126,7 @@ Then press <kbd>Enter</kbd> to customize this guide with your domain name.
1. Clone the git repo into the installation directory.

```
git clone https://github.com/centerofci/mathesar.git .
git clone https://github.com/mathesar-foundation/mathesar.git .
```

1. Checkout the tag of the latest stable release, `{{mathesar_version}}`.
Expand All @@ -144,9 +138,6 @@ Then press <kbd>Enter</kbd> to customize this guide with your domain name.
!!! warning "Important"
If you don't run the above command you'll end up installing the latest _development_ version of Mathesar, which will be less stable.

!!! tip
You can install a specific Mathesar release by running commands like `git checkout 0.1.1` (to install version 0.1.1, for example). You can see all available versions by running `git tag`.

1. We need to create a python virtual environment for the Mathesar application.

```
Expand Down Expand Up @@ -219,7 +210,7 @@ Then press <kbd>Enter</kbd> to customize this guide with your domain name.

```
wget https://github.com/mathesar-foundation/mathesar/releases/download/{{mathesar_version}}/static_files.zip
unzip static_files.zip && mv static_files mathesar/static/mathesar
unzip static_files.zip && mv static_files mathesar/static/mathesar && rm static_files.zip
```


Expand Down
2 changes: 2 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ nav:
- Environment variables: configuration/env-variables.md
- Administration:
- Upgrade:
- To 0.1.6: administration/upgrade/0.1.6.md
- To 0.1.5: administration/upgrade/0.1.5.md
- To 0.1.4: administration/upgrade/0.1.4.md
- To older versions: administration/upgrade/older.md
- Uninstall Mathesar: administration/uninstall.md
- Debug Mathesar: administration/debug.md
- Using Mathesar:
- Introduction: user-guide/index.md
- Importing data: user-guide/importing-data.md
Expand Down
9 changes: 4 additions & 5 deletions mathesar_ui/src/components/EntityPageHeader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,10 @@
.actions-right {
margin-left: auto;
display: flex;
> :global(* + *) {
margin-left: var(--size-xx-small);
}
display: grid;
grid-auto-flow: column;
align-items: center;
gap: var(--size-xx-small);
}
}
Expand Down

0 comments on commit cb1f538

Please sign in to comment.