compose-development #92

Merged
bustikiller merged 5 commits from compose-development into main 2024-11-03 13:16:30 +00:00
3 changed files with 22 additions and 6 deletions
Showing only changes of commit c2398c0d80 - Show all commits

View File

@ -38,5 +38,5 @@ COPY --from=build /rails /rails
ENTRYPOINT ["/rails/bin/docker-entrypoint"] ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime # Start the server by default, this can be overwritten at runtime
EXPOSE 3001 EXPOSE 3000
CMD ["./bin/rails", "server", "--binding=0.0.0.0"] CMD ["./bin/rails", "server", "--binding=0.0.0.0"]

View File

@ -4,17 +4,28 @@ services:
context: . context: .
dockerfile: Dockerfile.dev dockerfile: Dockerfile.dev
ports: ports:
- "3001:3001" - 3000
depends_on: 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: environment:
DATABASE_URL: postgres://postgres:postgres@db:5432/postgres DATABASE_URL: postgres://postgres:postgres@db:5432/postgres
RAILS_ENV: development RAILS_ENV: development
PORT: 3001
frontend: frontend:
build: ../wedding-planner-frontend build: ../wedding-planner-frontend
ports: ports:
- 3000:3000 - 3000
depends_on: depends_on:
- backend - backend
nginx: nginx:
@ -34,5 +45,10 @@ services:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
POSTGRES_DB: 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; server_name libre-wedding-planner.app.localhost;
location /api/ { location /api/ {
proxy_pass http://backend:3001/; proxy_pass http://backend:3000/;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
} }