Snippets Collections
version: '3.8'
services:
  ollama:
    volumes:
      - ollama:/root/.ollama
    container_name: ollama
    pull_policy: always
    tty: true
    restart: unless-stopped
    image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest}

  open-webui:
    image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main}
    container_name: open-webui
    volumes:
      - open-webui:/app/backend/data
    depends_on:
      - ollama
    environment:
      - 'OLLAMA_BASE_URL=http://ollama:11434'
      - 'WEBUI_SECRET_KEY='
    extra_hosts:
      - host.docker.internal:host-gateway
    restart: unless-stopped

  nginx-proxy-manager:
    image: 'jc21/nginx-proxy-manager:latest'
    container_name: nginx-proxy-manager
    restart: unless-stopped
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    depends_on:
      - open-webui

volumes:
  ollama: {}
  open-webui: {}
services:
  webui:
    image: ghcr.io/open-webui/open-webui:main
    ports:
      - 3000:8080/tcp
    volumes:
      - open-webui:/app/backend/data
    extra_hosts:
      - "host.docker.internal:host-gateway"
    depends_on:
      - ollama

  ollama:
    image: ollama/ollama
    expose:
      - 11434/tcp
    ports:
      - 11434:11434/tcp
    healthcheck:
      test: ollama --version || exit 1
    volumes:
      - ollama:/root/.ollama

volumes:
  ollama:
  open-webui:
--------------------------------------------------------------------------------------
# docker-compose.yaml
--------------------------------------------------------------------------------------
version: '3.6'

services:
  db:
    image: mariadb:latest
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: wpdb
      MYSQL_USER: wpdbuser
      MYSQL_PASSWORD: wppasswd
      VIRTUAL_HOST: example.com, www.example.com
    volumes:
      - ./data_db:/var/lib/mysql
    networks:
      - wpsite

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    depends_on:
      - db
    restart: unless-stopped
    ports:
      - 18000:80
    environment:
      PMA_HOST: db
      MYSQL_ROOT_PASSWORD: root
    networks:
      - wpsite

  wordpress:
    image: wordpress:latest
    depends_on:
      - db
    restart: unless-stopped
    ports:
      - 18001:80
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_NAME: wpdb
      WORDPRESS_DB_USER: wpdbuser
      WORDPRESS_DB_PASSWORD: wppasswd
    volumes:
      - ./YOUR_WORDPRESS_FOLDER:/var/www/html
    networks:
      - wpsite

   nginx: 
    build: 
      context: ./nginx
    ports: 
      - 80:80
    networks: 
      - nextjs-app

networks:
  wpsite:


#---------------------------------------------------------------------------
#./nginx/Dockerfile
#---------------------------------------------------------------------------
FROM nginx

# Remove any existing config files
RUN rm /etc/nginx/conf.d/\*

# Copy config files
COPY ./default.conf /etc/nginx/conf.d/

# If you want basic auth create a .htpasswd 
# COPY ./.htpasswd ./etc/nginx/.htpasswd

# Expose the listening port
EXPOSE 80

# Launch NGINX
CMD [ "nginx", "-g", "daemon off;" ]

#-------------------------------------------------------------------------
#./nginx/default.conf
#-------------------------------------------------------------------------

upstream nextjs {
  server wordpress:18001;
}

server {
    listen 80;
    server_name _;
    server_tokens off;

    gzip on;
    gzip_proxied any;
    gzip_comp_level 4;
    gzip_types text/css application/javascript image/svg+xml;

    
    
    location / {
    	proxy_pass: http://wordpress;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        #auth_basic "Restricted Content";
    	#auth_basic_user_file /etc/nginx/.htpasswd;
    }
    
}


# RUN TO CREATE A NEW PROJECT
# docker run --rm -v `pwd`:/var/www/html pimcore/pimcore:PHP8.0-fpm composer create-project pimcore/skeleton my-project

cd ./{NAME_OF_THE_PROJECT_FOLDER}

docker-compose up -d

# TO RUN ONLY WITH A LOCAL DATABASE.
# docker-compose exec php-fpm vendor/bin/pimcore-install --mysql-host-socket=db --mysql username=pimcore --mysql-password=pimcore --mysql-database=pimcore

docker-compose exec php-fpm composer install

docker-compose exec php-fpm chown -R www-data:www-data var

version: '2'
services:
  influxdb:
    image: influxdb
    restart: always
    ports:
      - 8086:8086
    volumes:
      - ./influxdb:/var/lib/influxdb
star

Tue Dec 03 2024 07:27:03 GMT+0000 (Coordinated Universal Time)

#ollama #docker-compose #ai #webui
star

Tue Nov 26 2024 20:04:40 GMT+0000 (Coordinated Universal Time) https://a-chacon.com/en/docker/2024/09/16/run-llm-locally.html

#ollama #docker-compose #ai #webui
star

Wed Jun 14 2023 23:12:01 GMT+0000 (Coordinated Universal Time)

#wordpress #docker-compose
star

Wed Mar 23 2022 14:56:15 GMT+0000 (Coordinated Universal Time)

#pimcore #docker #docker-compose
star

Wed Feb 17 2021 12:15:34 GMT+0000 (Coordinated Universal Time)

#docker-compose

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension