Skip to content

Commit 9b0fc33

Browse files
committed
feat: add environment configuration files and update Docker setup
1 parent 9bc8ea3 commit 9b0fc33

File tree

8 files changed

+1401
-245
lines changed

8 files changed

+1401
-245
lines changed

.env

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
SPRING_PROFILES_ACTIVE=prod
2+
DB_URL=jdbc:postgresql://postgres:5432/library
3+
DB_USERNAME=postgres
4+
DB_PASSWORD=postgres
5+
JWT_SECRET_KEY=7Wp3aOTk27lQ5RFKWHkNENof45qNVFX4CPpXdfimnNgsen3tweHuJM3dsIsUDF1xFQ9hzYZVjfVoG59Fbv3ILO
6+
REDIS_HOST=redis
7+
REDIS_PORT=6379

.env.dev

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
SPRING_PROFILES_ACTIVE=dev
2+
DB_URL=jdbc:postgresql://postgres:5432/library
3+
DB_USERNAME=postgres
4+
DB_PASSWORD=postgres
5+
REDIS_HOST=redis
6+
REDIS_PORT=6379
7+
JWT_SECRET_KEY=dev-insecure-key-for-local-development-only-do-not-use-in-production

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ build/
1717
bin/
1818
!**/src/main/**/bin/
1919
!**/src/test/**/bin/
20-
.env
20+
#.env #arquivo liberado - projeto de estudos
2121

2222
### IntelliJ IDEA ###
2323
.idea

Dockerfile

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,3 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
5454
LABEL org.opencontainers.image.title="Library API"
5555
LABEL org.opencontainers.image.version="1.0.0"
5656
LABEL org.opencontainers.image.authors="erichiroshi"
57-
58-
# docker compose up -d
59-
60-
# docker exec -i library-api-postgres-1 psql -U postgres -d library < seed_realistic_dataset.sql
61-
62-
# docker build -t library-api .
63-
64-
# docker compose -f docker-compose.dev.yml up -d
65-
# docker run -d --network library-api_backend -p 8080:8080 --env-file .env library-api
66-
67-
# alias resetdb="docker-compose down -v && docker compose -f docker-compose.dev.yml up -d"
68-

0 commit comments

Comments
 (0)