diff --git a/docker-compose.yml b/docker-compose.yml index 65a6555..94682e6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,9 +3,9 @@ services: image: postgres:15 container_name: vod_postgres environment: - POSTGRES_USER: myuser - POSTGRES_PASSWORD: mypassword - POSTGRES_DB: vodSystem + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_DB: ${POSTGRES_DB} volumes: - ${POSTGRES_DATA}:/var/lib/postgresql/data ports: @@ -21,7 +21,8 @@ services: env_file: - .env environment: - FRONTEND_URL: http://localhost + FRONTEND_URL: http://localhost:5173 + SPRING_PROFILES_ACTIVE: dev ports: - "8080:8080" restart: unless-stopped @@ -31,15 +32,13 @@ services: context: ./frontend dockerfile: Dockerfile container_name: vod_frontend - env_file: - - .env environment: - VITE_API_URL: "" + VITE_API_URL: "http://localhost:8080" VITE_GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID} depends_on: - backend ports: - - "1935:1935" + - "5173:5173" restart: unless-stopped rtmp: diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties new file mode 100644 index 0000000..aa67d31 --- /dev/null +++ b/src/main/resources/application-dev.properties @@ -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 \ No newline at end of file diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties index de8e995..fd79b55 100644 --- a/src/main/resources/application-local.properties +++ b/src/main/resources/application-local.properties @@ -1,13 +1,12 @@ # Database spring.datasource.url=jdbc:postgresql://localhost:5432/vodSystem -spring.datasource.username=myuser -spring.datasource.password=mypassword +spring.datasource.username=${POSTGRES_USER} +spring.datasource.password=${POSTGRES_PASSWORD} spring.datasource.driver-class-name=org.postgresql.Driver spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true spring.sql.init.mode=always spring.sql.init.schema-locations=classpath:db/schema.sql -#spring.sql.init.data-locations=classpath:db/data.sql # Frontend frontend.url=http://localhost:5173