Skip to content

Commit

Permalink
Add docker-compose file.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyjuareza committed Jun 21, 2024
1 parent aaa13e0 commit 31ad971
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: '3.8' # Use the version of Docker Compose that you need

services:
postgresdb:
image: postgres:latest # Use the latest PostgreSQL image
container_name: postgresdb # Name your container
environment:
POSTGRES_USER: yourusername # Set the username for the PostgreSQL database
POSTGRES_PASSWORD: yourpassword # Set the password for the PostgreSQL database
POSTGRES_DB: yourdatabase # Set the name of the database
ports:
- "5432:5432" # Map the PostgreSQL port to the host
volumes:
- postgres_data:/var/lib/postgresql/data # Persist the data using a named volume

volumes:
postgres_data:
driver: local # Use the local driver for the volume

0 comments on commit 31ad971

Please sign in to comment.