skip to Main Content

docker apache volume not working properly

version: "3.8" networks: frontend: backend: services: apache: container_name: apache build: ./docker/apache/ ports: - "8001:80" volumes: - ./src:/usr/local/apache2/htdocs networks: - frontend - backend php: container_name: php build: ./docker/php ports: - "9001:9000" volumes: - ./src:/usr/local/apache2/htdocs working_dir: /usr/local/apache2/htdocs networks: - backend apache.conf LoadModule…

VIEW QUESTION

Alter docker-compose.yml to add ports with python

def make_file(): read_file = r'C:Users~Desktopsample.yml' write_file = r'C:Users~Desktopsample_out.yml' f = open(read_file, 'r') lst = [line for line in f] f.close() ports = 'ports:n' for index in range(len(lst)): if "system_frontend:" in lst[index]: count_spaces = len(lst[index+1]) - len(lst[index+1].lstrip(' ')) lst.insert(index+1, ports) lst[index+1]…

VIEW QUESTION
Back To Top
Search