Skip to content

Commit

Permalink
docker compose example
Browse files Browse the repository at this point in the history
  • Loading branch information
LeRoid-hub committed Dec 26, 2024
1 parent 82ef167 commit a70fa3e
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion examples/compose.yml
Original file line number Diff line number Diff line change
@@ -1 +1,40 @@
EXAMPLE COMPOSE
services:
api:
container_name: bookholder-api
image: ghcr.io/leroid-hub/bookholder-api:latest
restart: always
depends_on:
- db
enviroment:
DB_USER: dbuser
DB_PASSWORD: dbpassword
DB_NAME: bookholder # Database name - optinal default is bookholder
DB_HOST: db
DB_PORT: 5432
PORT: 8080 # Port to run the api - optinal default is 8080
SECRET: secret_key_for_jwt_token_needs_to_be_at_least_32_characters
networks:
- bookholder-network
ports:
- 8080:8080
db:
container_name: postgres_container
image: postgres:17
restart: always
environment:
POSTGRES_USER: dbuser
POSTGRES_PASSWORD: dbpassword
POSTGRES_DB: bookholder # Database name - optinal
volumes:
- bookholder-db:/var/lib/postgresql
- bookholder-db:/home
networks:
- bookholder-network

volumes:
bookholder-db:

networks:
bookholder-network:
driver: bridge

0 comments on commit a70fa3e

Please sign in to comment.