Skip to content

Commit

Permalink
🧱 ci: add container with postgres database
Browse files Browse the repository at this point in the history
  • Loading branch information
R-enanVieira committed Dec 13, 2024
1 parent 65e2d6e commit 8d743d8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POSTGRES_USER=postgres
POSTGRES_PASSWORD=123456
POSTGRES_DB=postgres
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/venv
/venv
.env
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
services:
postgres:
image: postgres:latest
container_name: unimancer_postgres
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
14 changes: 14 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
config:
@cp .env.template .env

build:
@sudo docker compose up --build

start:
@sudo docker compose up

stop:
@sudo docker compose down

rmv:
@sudo docker compose down -v

0 comments on commit 8d743d8

Please sign in to comment.