Skip to content

Commit f2bc6be

Browse files
authored
Merge pull request #958 from cortex-lab/change_docs
Change docs
2 parents 0a154c9 + b7a9f4d commit f2bc6be

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

deploy/docker-compose-postgres.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ services:
66
volumes:
77
- alyx_postgres:/var/lib/postgresql/data
88
ports:
9-
- "5432:5432"
9+
- ${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432}
10+
command: -p ${POSTGRES_PORT:-5432}
1011
volumes:
1112
alyx_postgres:

docs/03_deployment.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,19 @@ For a simple deployment using a containerized version of Alyx interacting with a
66
For running alyx directly on the host machine, follow the instructions below.
77

88

9+
910
## Install a development version of Alyx on the host machine
1011

12+
Clone the alyx repository from [here](https://github.com/cortex-lab/alyx).
13+
```shell
14+
git clone https://github.com/cortex-lab/alyx.git
15+
cd alyx
16+
```
17+
18+
Create a virtual environment using uv and install the repo in an editable mode using `uv pip install -e .`
19+
20+
21+
1122
Copy the settings files from the deploy folder inside of the alyx project. Those files are ignored by git.
1223

1324
```shell
@@ -20,12 +31,14 @@ Copy the environment template file and edit the path to the logs
2031
cp ./alyx/alyx/environment_template.env ./alyx/alyx/.env
2132
vi ./alyx/alyx/.env
2233
```
23-
In the environment file, you need to provide a writable log directory and change the postgres host to localhost
34+
In the environment file, you need to provide a writable log directory and change the postgres host to localhost.
2435
```shell
2536
APACHE_LOG_DIR=/Users/olivier/scratch/alyxlogs
2637
POSTGRES_HOST=localhost
2738
```
2839

40+
**Note:** On macOS, if there is a local version of the postgres already installed and you want to use the containerized version of postgres, it is also good to change the variable `POSTGRES_PORT` in the .env file to 5433. And export the variable as well using `export POSTGRES_PORT=5433` in the shell where the following commands will be launched.
41+
2942
First we will start the docker service containing the database and make sure we can connect to it using the current `.env` settings.
3043
The `showmigrations` command will fail if the database is not available.
3144
```shell

0 commit comments

Comments
 (0)