0
<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="WebInterfaceApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
    <option name="DEBUG_MODE" value="true" />
    <module name="smsc" />
    <target name="app" />
    <option name="SPRING_BOOT_MAIN_CLASS" value="com.bringo.webinterface.WebInterfaceApplication" />
    <method v="2">
      <option name="USE_CTRL_SHUTDOWN" value="true" />
      <option name="REMOVE_CONTAINERS_AFTER_STOP" value="true" />
      <option name="Maven.BeforeRunTask" enabled="true" file="$PROJECT_DIR$/pom.xml" goal="clean install" />
      <option name="Make" enabled="true" />
    </method>
  </configuration>
</component>

This is my run configuration for Spring Boot simple backend application.

IDEA run configuration screenshot

This is how it looks like.

It works fine and i use it every time, but after pressing stop button i have to manually kill container.

THis is my docker compose file

version: '3.7'

volumes:
  jss7Dependencies:

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
      target: application
    volumes:
      - .:/app
      - jss7Dependencies:/.m2
    user: root
    restart: "no"
    stop_grace_period: 5s
    networks:
      test_net:
        ipv4_address: 10.5.10.10 #TODO FIGURE OUT nginx routing is needed?
    command: /bin/sh -c "mvn -s settings.xml spring-boot:run"


  nginx-reverse-proxy:
    image: nginx:latest
    ports:
      - 1313:1313
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
    networks:
      test_net:

networks:
  test_net:
    driver: bridge
    ipam:
      config:
        - subnet: 10.5.10.0/24
          gateway: 10.5.10.1

How can i configure auto kill container? Thank you!

I tryed many configs and options but container still there!

How can i configure auto kill container? Thank you!

Неуч
  • 1
  • 1

0 Answers0