services: app: build: context: ../ dockerfile: ./docker/Dockerfile container_name: app depends_on: - postgres_nto environment: - SPRING_DATASOURCE_URL=jdbc:postgresql://postgres_nto:5432/application_db - SPRING_DATASOURCE_USERNAME=indexzero - SPRING_DATASOURCE_PASSWORD=gkl370WVUPMgLhK ports: - "8081:8080" postgres_nto: image: postgres:latest container_name: postgres_nto environment: POSTGRES_USER: indexzero POSTGRES_PASSWORD: gkl370WVUPMgLhK POSTGRES_DB: application_db PGDATA: /var/lib/postgresql/data/pgdata ports: - "5430:5432" volumes: - postgres_nto_data:/var/lib/postgresql/data/pgdata restart: unless-stopped tty: true stdin_open: true volumes: postgres_nto_data: driver: local