build: move postgres credentials to env
This commit is contained in:
@@ -3,9 +3,9 @@ services:
|
|||||||
image: postgres:15
|
image: postgres:15
|
||||||
container_name: vod_postgres
|
container_name: vod_postgres
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: myuser
|
POSTGRES_USER: ${POSTGRES_USER}
|
||||||
POSTGRES_PASSWORD: mypassword
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
POSTGRES_DB: vodSystem
|
POSTGRES_DB: ${POSTGRES_DB}
|
||||||
volumes:
|
volumes:
|
||||||
- ${POSTGRES_DATA}:/var/lib/postgresql/data
|
- ${POSTGRES_DATA}:/var/lib/postgresql/data
|
||||||
ports:
|
ports:
|
||||||
@@ -21,7 +21,8 @@ services:
|
|||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
environment:
|
environment:
|
||||||
FRONTEND_URL: http://localhost
|
FRONTEND_URL: http://localhost:5173
|
||||||
|
SPRING_PROFILES_ACTIVE: dev
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@@ -31,15 +32,13 @@ services:
|
|||||||
context: ./frontend
|
context: ./frontend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: vod_frontend
|
container_name: vod_frontend
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
environment:
|
environment:
|
||||||
VITE_API_URL: ""
|
VITE_API_URL: "http://localhost:8080"
|
||||||
VITE_GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
|
VITE_GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
ports:
|
ports:
|
||||||
- "1935:1935"
|
- "5173:5173"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
rtmp:
|
rtmp:
|
||||||
|
|||||||
4
src/main/resources/application-dev.properties
Normal file
4
src/main/resources/application-dev.properties
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
spring.datasource.url=jdbc:postgresql://postgres:5432/vodSystem
|
||||||
|
spring.datasource.username=${POSTGRES_USER}
|
||||||
|
spring.datasource.password=${POSTGRES_PASSWORD}
|
||||||
|
spring.datasource.driver-class-name=org.postgresql.Driver
|
||||||
@@ -1,13 +1,12 @@
|
|||||||
# Database
|
# Database
|
||||||
spring.datasource.url=jdbc:postgresql://localhost:5432/vodSystem
|
spring.datasource.url=jdbc:postgresql://localhost:5432/vodSystem
|
||||||
spring.datasource.username=myuser
|
spring.datasource.username=${POSTGRES_USER}
|
||||||
spring.datasource.password=mypassword
|
spring.datasource.password=${POSTGRES_PASSWORD}
|
||||||
spring.datasource.driver-class-name=org.postgresql.Driver
|
spring.datasource.driver-class-name=org.postgresql.Driver
|
||||||
spring.jpa.hibernate.ddl-auto=update
|
spring.jpa.hibernate.ddl-auto=update
|
||||||
spring.jpa.show-sql=true
|
spring.jpa.show-sql=true
|
||||||
spring.sql.init.mode=always
|
spring.sql.init.mode=always
|
||||||
spring.sql.init.schema-locations=classpath:db/schema.sql
|
spring.sql.init.schema-locations=classpath:db/schema.sql
|
||||||
#spring.sql.init.data-locations=classpath:db/data.sql
|
|
||||||
|
|
||||||
# Frontend
|
# Frontend
|
||||||
frontend.url=http://localhost:5173
|
frontend.url=http://localhost:5173
|
||||||
|
|||||||
Reference in New Issue
Block a user