skip to Main Content

How to use nginx (intsalled on Docker) to reverse proxy MySQL (installed on Docker too)

Here is docker-compose.yaml services: nginx: image: nginx:1.23.3 container_name: nginx volumes: - /lnmpg/nginx/conf.d:/etc/nginx/conf.d:ro,cached - /lnmpg/nginx/nginx.conf:/etc/nginx/nginx.conf :ro - /lnmpg/nginx/log:/var/log/nginx - /lnmpg/nginx/html:/usr/share/nginx/html ports: - "80:80" - "443:443" - "33060:3306" environment: - TZ=Asia/Shanghai restart: always networks: - nginx-mysql mysql: image: mysql:5.7.41 # ports: #…

VIEW QUESTION

Python MySQL – best practises. Create & connect

could you advise me on best practices on how to deal with MySQL class in Python application? class DBClient: def __init__(self, db_name=None): self.conn = None self.db_name = db_name self.__create_connection() def __create_connection(self): try: self.conn = mysql.connector.connect( host="127.0.0.1", port=3306, user="root", password="password", database=self.db_name…

VIEW QUESTION
Back To Top
Search