Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mohe2015 committed Mar 3, 2024
1 parent e65d64e commit 0cc4e8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@ To ensure data security you need two users to access the database. One privilege
## Setup

```bash
sudo docker stop projektwahl-postgres
sudo docker run --rm --name projektwahl-postgres -p 5432:5432 -v projektwahl-postgres:/var/lib/postgresql/data -e POSTGRES_PASSWORD=mysecretpassword -d docker.io/library/postgres:16.2

git clone https://github.com/projektwahl/projektwahl-lit.git
cd projektwahl-lit/

sudo docker-compose up -d

npm i
# generate tls certificate
openssl req -x509 -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' -keyout key.pem -out cert.pem
Expand Down
13 changes: 6 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
target: backend
# https://caddyserver.com/docs/running#docker-compose
caddy:
image: caddy:<version>
image: caddy:2
restart: unless-stopped
ports:
- "80:80"
Expand All @@ -19,15 +19,14 @@ services:
- caddy_data:/data
- caddy_config:/config
postgres:
image: docker.io/library/postgres
restart: always
image: docker.io/library/postgres:16.2
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: projektwahl
volumes:
# - db-data:/var/lib/postgresql
- ./src/server/setup.sql:/opt/projektwahl-lit/src/server/setup.sql
- ./setup-postgresql.sh:/docker-entrypoint-initdb.d/setup-postgresql.sh
- projektwahl-postgres:/var/lib/postgresql/data
volumes:
db-data:
projektwahl-postgres:
caddy_data:
caddy_config:

0 comments on commit 0cc4e8c

Please sign in to comment.