Untitled

 avatar
unknown
plain_text
a year ago
1.4 kB
6
Indexable
version: '3.8'
services:
  nginx:
    build:
      context: ./nginx
      dockerfile: Dockerfile
    ports:
      - '80:80'
      - '443:443'
    volumes:
      - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
      - ./nginx/nnp.crt:/etc/nginx/certs/nnp.crt
      - ./nginx/nusanetwork.com.key:/etc/nginx/certs/nusanetwork.com.key
      - /etc/localtime:/etc/localtime:ro
      # - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
    depends_on:
      - backend
    restart: always
    stdin_open: true # docker run -i
    tty: true  
  backend:
    build:
      context: ./
      dockerfile: Dockerfile
    ports:
      - '3000:3000'
    restart: always
    stdin_open: true # docker run -i
    tty: true  
    volumes:
      - backend-wasit:/app
      - .:/app
      - /app/node_modules
      - /etc/localtime:/etc/localtime:ro
      # - /etc/timezone:/etc/timezone:ro
    depends_on:
      - mysql
  mysql:
    # build: 
    #   context: ./mysql
    #   dockerfile: dev.dockerfile
    image: mariadb
    restart: always
    stdin_open: true # docker run -i
    tty: true  
    ports:
      - '3306:3306'
    volumes:
      - mysql-volume:/var/lib/mysql
      - ./mysql/obscape.sql:/docker-entrypoint-initdb.d/obscape.sql #copy database exxport
      - /etc/localtime:/etc/localtime:ro
    environment:
      MYSQL_ROOT_PASSWORD: rootpass
      MYSQL_DATABASE: obscape
volumes:
  backend-wasit:
  mysql-volume:
Editor is loading...
Leave a Comment