60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
# docker-compose.yml
|
|
version: '3.8'
|
|
|
|
# Define the services for our application stack
|
|
services:
|
|
|
|
|
|
spring:
|
|
#image: mathewfrancisv/spring_back_postgres:v1.0.0
|
|
image: mathewfrancisv/btc_cezen_backend:v2.3.0
|
|
container_name: spring_app
|
|
ports:
|
|
- "8083:8080"
|
|
environment:
|
|
# jdbc:postgresql://localhost:5432/horse
|
|
# SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/horse
|
|
SPRING_DATASOURCE_CORSIP: http://10.236.119.124:4200
|
|
#network_mode: host
|
|
networks:
|
|
- app_network
|
|
# depends_on:
|
|
# - postgres
|
|
|
|
# Angular frontend application service
|
|
angular-dev:
|
|
image: node:20.19.0-alpine
|
|
container_name: angular_dev_app
|
|
working_dir: /app
|
|
volumes:
|
|
- ../btc-UI:/app
|
|
command: sh -c "npm install && npm run start"
|
|
# IMPORTANT: This service is explicitly part of the 'app_network' (bridge)
|
|
# Removing network_mode: host for this service
|
|
# network_mode: host
|
|
ports:
|
|
- "4200:4200" # REQUIRED to expose Angular to the host machine in bridge mode
|
|
networks:
|
|
- app_network # Connect to the custom bridge network
|
|
depends_on:
|
|
- spring # The 'spring' service might not be directly reachable by name here
|
|
|
|
# Optional Nginx service for Angular (if you were deploying production build)
|
|
# angular:
|
|
# image: nginx:alpine
|
|
# container_name: angular_app
|
|
# ports:
|
|
# - "80:80"
|
|
# volumes:
|
|
# - ./angular/dist/your-angular-app:/usr/share/nginx/html
|
|
# - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
|
|
# networks:
|
|
# - app_network
|
|
# depends_on:
|
|
# - spring
|
|
|
|
# Define the custom bridge network for 'angular-dev'
|
|
networks:
|
|
app_network:
|
|
driver: bridge # Use the default bridge driver
|