postgres via sqlx - workable?
This commit is contained in:
43
compose.yaml
43
compose.yaml
@@ -1,6 +1,5 @@
|
||||
services:
|
||||
mnemosyne:
|
||||
container_name: mnemosyne
|
||||
core:
|
||||
build:
|
||||
context: .
|
||||
target: final
|
||||
@@ -8,19 +7,33 @@ services:
|
||||
- 39321:39321
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
# Mnemosyne would greatly enjoy not having an ephemeral database.
|
||||
# If you're okay with storing it side by side with the compose file,
|
||||
# a bind mount like this is one way to do it. Remember to mkdir!
|
||||
- ./mnemodata:/app/data
|
||||
# Another way is to use a docker volume.
|
||||
# - mnemodata:/app/data
|
||||
environment:
|
||||
# DATABASE_URL is crucial for Mnemosyne to work; it will fail without it.
|
||||
# Point it at where you'd like your database to be.
|
||||
- DATABASE_URL=/app/data/db.db
|
||||
# Mnemosyne uses port 39321 for HTTP by default;
|
||||
# - PORT=39321
|
||||
# - PORT=39321 # Mnemosyne uses port 39321 for HTTP by default;
|
||||
- DATABASE_URL=postgres://mnemo:syne@postgres:5432/mnemosyne
|
||||
networks:
|
||||
- mnemosyne
|
||||
depends_on:
|
||||
- postgres
|
||||
postgres:
|
||||
image: postgres:18.3-alpine3.23
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 5432:5432
|
||||
volumes:
|
||||
- pg_volume:/var/lib/postgresql/data:rw
|
||||
stop_grace_period: 120s
|
||||
environment:
|
||||
POSTGRES_USER: mnemo
|
||||
POSTGRES_PASSWORD: syne
|
||||
POSTGRES_DB: mnemosyne
|
||||
networks:
|
||||
- mnemosyne
|
||||
|
||||
# Declaring a volume for the docker volume example.
|
||||
# volumes:
|
||||
# mnemodata:
|
||||
networks:
|
||||
mnemosyne:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
pg_volume:
|
||||
driver: local
|
||||
|
||||
Reference in New Issue
Block a user