Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.1'
- services:
- API:
- image: theatre-app
- ports:
- - "8080:8080"
- depends_on:
- - PostgreSQL
- environment:
- - SPRING_DATASOURCE_URL=jdbc:postgresql://PostgreSQL:5432/db1
- - SPRING_DATASOURCE_USERNAME=postgres
- - SPRING_DATASOURCE_PASSWORD=postgres
- - SPRING_JPA_HIBERNATE_DDL_AUTO=update
- networks:
- - backend
- - frontend
- PostgreSQL:
- image: postgres
- ports:
- - "5432:5432"
- environment:
- - POSTGRES_PASSWORD=postgres
- - POSTGRES_USER=postgres
- - POSTGRES_DB=db1
- healthcheck:
- test: [ "CMD-SHELL", "pg_isready -U postgres" ]
- interval: 10s
- timeout: 5s
- retries: 5
- networks:
- - backend
- frontend:
- image: theatre-front
- build:
- dockerfile: Dockerfile
- args:
- REACT_APP_API_BASE_URL: http://localhost:3000
- ports:
- - "9090:80" # Map the exposed port 80 on the container to port 9090 on the host machine
- restart: always
- depends_on:
- - API
- networks:
- - frontend
- # Networks to be created to facilitate communication between containers
- networks:
- backend:
- frontend:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement