title: Run nginx in dockerfile with backend and frontend parallel
body: <p>How can I run nginx in dockerfile with backend and frontend parallel?</p>
  
  <p>This is for a new Linux server and I installed docker to run all service like nginx for backend and frontend.</p>
  
  <p>Actually, I can run backend local with dockerfile but how to integrate with backend and frontend. Furthermore to run with server nginx ...</p>
  
  <pre><code>    version: "3"
  
  networks:
    xukashopnet:
      driver: bridge
      ipam:
        driver: default
        config:
          - subnet: 10.0.5.0/16
  #       gateway: 10.0.5.1
  services:
    xukashop-database:
      image: mysql:8
      container_name: xukashop-db
      ports:
        - "8091:3306"
        - "33061:33060"
      restart: always
      volumes:
        - ./db_data:/var/lib/mysql
        - .:/xukashop
      environment:
        - MYSQL_ROOT_PASSWORD=12345678
        - MYSQL_DATABASE=xukashop
        - MYSQL_USER=admin
        - MYSQL_PASSWORD=123456789
      networks:
        xukashopnet:
          ipv4_address: 10.0.5.2
    xukashop-api:
      build:
        context: ./
        dockerfile: Dockerfile
      environment:
        - XUKA_SHOP_DATABASE_HOST=10.0.5.2
        - XUKA_SHOP_DATABASE_PORT=3306
        - XUKA_SHOP_DATABASE_NAME=xukashop
        - XUKA_SHOP_DATABASE_USERNAME=admin
        - XUKA_SHOP_DATABASE_PASSWORD=123456789
      restart: always
      ports:
        - 8080:8080
      links:
        - xukashop-database
      depends_on:
        - xukashop-database
      volumes:
        - .:/xukashop
      stdin_open: true
      tty: true
      networks:
        xukashopnet:
          ipv4_address: 10.0.5.3
  volumes:
    db_data:
  </code></pre>