diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 0000000..9b3f47c --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,10 @@ +services: + rtmp: + extends: + file: docker-compose.yml + service: rtmp + + postgres: + extends: + file: docker-compose.yml + service: postgres \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 906f05a..65a6555 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,4 @@ services: - postgres: image: postgres:15 container_name: vod_postgres @@ -9,6 +8,8 @@ services: POSTGRES_DB: vodSystem volumes: - ${POSTGRES_DATA}:/var/lib/postgresql/data + ports: + - "5432:5432" backend: build: @@ -46,9 +47,6 @@ services: context: ./nginx dockerfile: Dockerfile container_name: vod_rtmp - depends_on: - - backend - - frontend ports: - "1935:1935" volumes: diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 98518a5..bf0c004 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -3,15 +3,6 @@ events { worker_connections 1024; } -upstream backend { - server 127.0.0.1:8080; -} - -upstream frontend { - server 127.0.0.1:5173; -} - - rtmp { server { listen 1935; diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties index 0325cb2..de8e995 100644 --- a/src/main/resources/application-local.properties +++ b/src/main/resources/application-local.properties @@ -1,5 +1,5 @@ # Database -spring.datasource.url=jdbc:postgresql://postgres:5432/vodSystem +spring.datasource.url=jdbc:postgresql://localhost:5432/vodSystem spring.datasource.username=myuser spring.datasource.password=mypassword spring.datasource.driver-class-name=org.postgresql.Driver @@ -11,3 +11,6 @@ spring.sql.init.schema-locations=classpath:db/schema.sql # Frontend frontend.url=http://localhost:5173 + +# Docker +spring.docker.compose.file=docker-compose.dev.yml