]> git.openstreetmap.org Git - nominatim.git/blob - .github/actions/setup-postgresql/action.yml
actions: update apt repo before installing software
[nominatim.git] / .github / actions / setup-postgresql / action.yml
1 name: 'Setup Postgresql and Postgis'
2
3 runs:
4     using: "composite"
5
6     steps:
7         - name: Install postgis
8           run: |
9             sudo apt-get update -qq
10             sudo apt-get install -y -qq postgresql-13-postgis-3 postgresql-13-postgis-3-scripts postgresql-server-dev-13
11           shell: bash
12
13         - name: Adapt postgresql configuration
14           run: |
15               echo 'fsync = off' | sudo tee /etc/postgresql/13/main/conf.d/local.conf
16               echo 'synchronous_commit = off' | sudo tee -a /etc/postgresql/13/main/conf.d/local.conf
17               echo 'full_page_writes = off' | sudo tee -a /etc/postgresql/13/main/conf.d/local.conf
18               echo 'shared_buffers = 1GB' | sudo tee -a /etc/postgresql/13/main/conf.d/local.conf
19           shell: bash
20
21         - name: Setup database
22           run: |
23               sudo systemctl start postgresql
24               sudo -u postgres createuser -S www-data
25               sudo -u postgres createuser -s runner
26           shell: bash