Merge pull request #1322 from jvmatl/ubuntu_from_scratch_feedback

Ran through the 'Ubuntu from Scratch' procedure using a fresh Ubuntu 22.04.3 LTS VM and took notes on what worked and what didn't.
This commit is contained in:
Yohan Boniface 2023-09-20 08:02:47 +02:00 committed by GitHub
commit 5587632168
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,13 +6,14 @@ You need sudo grants on this server, and it must be connected to Internet.
## Install system dependencies
sudo apt install python3 python3-dev python3-venv wget nginx uwsgi uwsgi-plugin-python3 postgresql gcc postgis libpq-dev
sudo apt update
sudo apt install python3 python3-dev python3-venv virtualenv wget nginx uwsgi uwsgi-plugin-python3 postgresql gcc postgis libpq-dev
*Note: nginx and uwsgi are not required for local development environment*
## Create deployment directories:
sudo mkdir -p /etc/umap
sudo mkdir -p /etc/umap
*You can change this path, but then remember to adapt the other steps accordingly.*
@ -33,17 +34,17 @@ on the various commands and configuration files if you go with your own.*
## Create a postgresql user
sudo -u postgres createuser umap
sudo -u postgres -D ~postgres createuser umap
## Create a postgresql database
sudo -u postgres createdb umap -O umap
sudo -u postgres -D ~postgres createdb umap -O umap
## Activate PostGIS extension
sudo -u postgres psql umap -c "CREATE EXTENSION postgis"
sudo -u postgres -D ~postgres psql umap -c "CREATE EXTENSION postgis"
## Login as umap Unix user
@ -55,8 +56,8 @@ From now on, unless we say differently, the commands are run as `umap` user.
## Create a virtualenv and activate it
virtualenv /srv/umap/venv --python=/usr/bin/python3.6
source /srv/umap/venv/bin/activate
virtualenv /srv/umap/venv --python=/usr/bin/python3.10
. /srv/umap/venv/bin/activate
*Note: this activation is not persistent, so if you open a new terminal window,
you will need to run again this last line.*
@ -75,12 +76,8 @@ you will need to run again this last line.*
nano /etc/umap/umap.conf
Change the following properties:
```
STATIC_ROOT = '/srv/umap/var/static'
MEDIA_ROOT = '/srv/umap/var/data'
```
* update the [SECRET_KEY](settings.md#secret_key)
* update the ADMINS list
## Create the tables