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 Jun 25, 2024
1 parent fddd601 commit 88555ab
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
volumes:
postgres:

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
env_file:
- .env
environment:
- DATABASE_URL=psql://comics:comics@postgres:5432/comics
- PORT=8000
command: web
ports:
- "8000:8000"

0 comments on commit 88555ab

Please sign in to comment.