version: '3.8' services: #Use postgres/example user/password credentials #container which contains the databank and its entries db: container_name: pg_container_test_vimes image: postgres restart: always logging: driver: json-file options: max-size: 10m max-file: "3" environment: POSTGRES_USER: root POSTGRES_PASSWORD: root POSTGRES_DB: test_db_vimes ports: - "5432:5432" #pg admin can display the databank entries in a browser # pg_admin: # container_name: pgadmin4_container_test_vimes # image: dpage/pgadmin4 # restart: always # environment: # PGADMIN_DEFAULT_EMAIL: admin@admin.com #somehow can not change those # PGADMIN_DEFAULT_PASSWORD: root # ports: # - "5050:80" #MAIN controller for whole program py_app_main: #container called pyApp container_name: pyapp_main_test_vimes build: #build it with context: . #either a path to a directory containing a Dockerfile, or a url to a git repository. dockerfile: ./pyDockerfile #path to the Dockerfile #somehow need ./ so that Vimes uses the same dir as path command: python main.py --init #the command which is done logging: #build a log file of the terminal output in /var/lib/docker/containers/[container-id]/[container-id]-json.log driver: json-file options: max-size: 10m max-file: "3" ports: - 3000:5432 volumes: - personsNames:/var/lib/data #acceses the volume "personsNames" with its path "/var/lib/data" #container which extracts all data from Dobby using selenium py_extract_dobby: container_name: py_extract_dobby_test_vimes build: context: . dockerfile: ./pyDockerfile #dockerfile with python image installing the required packages logging: driver: json-file options: max-size: 10m max-file: "3" command: python extractDobby.py ports: - 6666:4444 volumes: - personsNames:/var/lib/data #saves all names at crossnative in a volume - "/data:/var/lib/data" #can save it in host, therefore use hostpath:conatainerpath => this is a mount, not a volume #for now mount it to /data on the host machine, but maybe somewhere else later #just contains the selenium webbrowser so other containers can use it selenium_browser: container_name: sel_browser_test_vimes image: selenium/standalone-chrome:4.10.0-20230607 restart: unless-stopped logging: driver: json-file options: max-size: 10m max-file: "3" shm_size: '2gb' #size of shared memory, made it much bigger, so that the tab will not crash ports: - 4444:4444 volumes: personsNames: #build a volume called "my-volume"