Avoid exposing internal ports
All checks were successful
Check usage of free licenses / build-static-assets (pull_request) Successful in 1m54s
Add copyright notice / copyright_notice (pull_request) Successful in 2m32s
Run unit tests / unit_tests (pull_request) Successful in 4m0s

This commit is contained in:
Manuel Bustillo 2024-11-03 13:53:36 +01:00
parent 95651ee942
commit c2398c0d80
3 changed files with 22 additions and 6 deletions

View File

@ -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"]

View File

@ -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

View File

@ -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;
}