services: postgres: image: postgres:16-alpine container_name: ticketsystem-db environment: POSTGRES_DB: ticketsystem POSTGRES_USER: postgres POSTGRES_PASSWORD: ${DB_PASSWORD:-postgrespassword} volumes: - postgres_data:/var/lib/postgresql/data networks: - ticketsystem-network restart: unless-stopped backend: build: ./Backend container_name: ticketsystem-backend environment: SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/ticketsystem SPRING_DATASOURCE_USERNAME: postgres SPRING_DATASOURCE_PASSWORD: ${DB_PASSWORD:-postgrespassword} depends_on: - postgres networks: - ticketsystem-network restart: unless-stopped frontend: build: ./Frontend container_name: ticketsystem-frontend environment: NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8080/api} API_URL: http://backend:8080 NEXTAUTH_SECRET: ${NEXTAUTH_SECRET} NEXTAUTH_URL: ${NEXTAUTH_URL} depends_on: - backend networks: - ticketsystem-network restart: unless-stopped networks: ticketsystem-network: driver: bridge volumes: postgres_data: