strapi-docker-compose-example icon indicating copy to clipboard operation
strapi-docker-compose-example copied to clipboard

nginx support

Open murilobd opened this issue 5 years ago • 1 comments

Hi! Thanks for this repo and article! Really good!! Could you also add nginx to docker-compose and show us how it would looks like?

Thanks!

murilobd avatar Aug 28 '20 11:08 murilobd

Hi! Thanks for this repo and article! Really good!! Could you also add nginx to docker-compose and show us how it would looks like?

Thanks!

best way to use Nginx on docker is using Nginx Proxy Manager is a open source and have docker-compose ready repo https://github.com/jc21/nginx-proxy-manager

version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    environment:
      DB_MYSQL_HOST: "db"
      DB_MYSQL_PORT: 3306
      DB_MYSQL_USER: "npm"
      DB_MYSQL_PASSWORD: "npm"
      DB_MYSQL_NAME: "npm"
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
  db:
    image: 'jc21/mariadb-aria:latest'
    environment:
      MYSQL_ROOT_PASSWORD: 'npm'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: 'npm'
    volumes:
      - ./data/mysql:/var/lib/mysql

traderpedroso avatar Apr 24 '21 12:04 traderpedroso