diff --git a/Dockerfile.dev b/Dockerfile.dev index dbb61bc..792a1ce 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -38,5 +38,5 @@ COPY --from=build /rails /rails ENTRYPOINT ["/rails/bin/docker-entrypoint"] # Start the server by default, this can be overwritten at runtime -EXPOSE 3001 +EXPOSE 3000 CMD ["./bin/rails", "server", "--binding=0.0.0.0"] diff --git a/docker-compose.yml b/docker-compose.yml index 97fa122..6aadc77 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,17 +4,28 @@ services: context: . dockerfile: Dockerfile.dev ports: - - "3001:3001" + - 3000 depends_on: - - db + db: + condition: service_healthy + environment: + DATABASE_URL: postgres://postgres:postgres@db:5432/postgres + RAILS_ENV: development + workers: + build: + context: . + dockerfile: Dockerfile.dev + entrypoint: bin/jobs + depends_on: + db: + condition: service_healthy environment: DATABASE_URL: postgres://postgres:postgres@db:5432/postgres RAILS_ENV: development - PORT: 3001 frontend: build: ../wedding-planner-frontend ports: - - 3000:3000 + - 3000 depends_on: - backend nginx: @@ -34,5 +45,10 @@ services: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U postgres'] + interval: 10s + timeout: 5s + retries: 5 \ No newline at end of file diff --git a/nginx.conf b/nginx.conf index f8a4fac..995c062 100644 --- a/nginx.conf +++ b/nginx.conf @@ -3,7 +3,7 @@ server { server_name libre-wedding-planner.app.localhost; location /api/ { - proxy_pass http://backend:3001/; + proxy_pass http://backend:3000/; proxy_set_header Host $http_host; }