Skip to content

Commit

Permalink
Set up docker-compose with PostgreSQL image
Browse files Browse the repository at this point in the history
  • Loading branch information
jodal committed Dec 29, 2024
1 parent a0d922b commit c420c18
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: comics

volumes:
postgres:
media:

services:
postgres:
image: postgres:16
environment:
- POSTGRES_USER=comics
- POSTGRES_PASSWORD=comics
- POSTGRES_DB=comics
volumes:
- postgres:/var/lib/postgresql/data
command:
- postgres
- -cfsync=off
- -cfull_page_writes=off
- -csynchronous_commit=off
ports:
- "5432:5432"

web:
build:
context: .
dockerfile: Dockerfile
image: comics:latest
depends_on:
- postgres
environment:
- DATABASE_URL=postgres://comics:comics@postgres:5432/comics
- PORT=8000
volumes:
- media:/media
command: web
ports:
- "8000:8000"

0 comments on commit c420c18

Please sign in to comment.