ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    使用 Docker 搭建 Postgres 数据库

    Jun 5, 20243 min read

    创建 docker-compose.yml 文件

    version: '3.1'
    services:
      nextjs-learn-domes:
        image: postgres
        volumes:
          - ./postgres:/var/lib/postgresql/data
        ports:
          - 5432:5432
        environment:
          - POSTGRES_USER=myuser
          - POSTGRES_PASSWORD=mypassword
    
      adminer:
        image: adminer
        restart: always
        ports:
          - 8080:8080
    
    

    启动 Docker

    docker-compose up -d
    

    相关文章

    NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator.

    The warning in the code indicates that the `nopython` keyword argument was not specified in the `numba.jit` decorator, and advises setting it to `True` to avoid future deprecation warnings and improve code efficiency.

    解决 ERROR Could not install packages due to an OSError Missing dependencies for SOCKS support

    解决因缺少 SOCKS 支持依赖导致的安装包错误,通过取消设置代理并安装 pysocks 库来解决。

    常用的JavaScript延迟加载方式有哪些?

    JavaScript延迟加载方式包括将代码置于<body>底部、使用defer和async属性、以及动态加载JavaScript。

    解释js中的任务队列是什么?

    JavaScript中的任务队列是管理异步代码执行顺序的事件处理机制,分为宏任务队列和微任务队列,用于执行不同类型的异步操作。

    DNS 污染战争

    DNS污染包括DNS缓存服务器污染、DNS抢答和DNS劫持,可通过更换DNS服务器、修改系统内核、使用加密的DNS协议及VPN等方法进行防护。