惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
腾讯CDC
M
MIT News - Artificial intelligence
Y
Y Combinator Blog
L
LangChain Blog
Vercel News
Vercel News
云风的 BLOG
云风的 BLOG
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
The GitHub Blog
The GitHub Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog
P
Proofpoint News Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
IT之家
IT之家
A
About on SuperTechFans
H
Help Net Security

博客园 - 干炸小黄鱼

timex 处理时间戳 gorm-gen go 雪花算法 golang每日一库--协程池库ants golang每日一库--json解析库gjson python高级编程-asyncio python高级编程-condition python高级编程-event python装饰器-自动重试 EAP系统 go实现实现 SECS/GEM 协议 设备通信协议 SECS go项目使用Jenkins进行CICD go操作ES mongo db聚合查询 go如何使用mongodb Apache ShardingSphere paxos and raft (分布式一致性算法) go使用zookeeper分布式锁以及和redis差异 go使用 seata 示例 Alibaba 分布式事务 Seata go中使用saga go中使用TCC示例 分布式事务TCC 熔断器 Hystrix OR Sentinel k8s下部署consul and etcd Consul OR Etcd 【力扣hot100】双指针-盛水最多的容器 【力扣hot100】滑动窗口-最小覆盖子串 shell脚本合集
常规web项目 docker-compose 例子
干炸小黄鱼 · 2024-09-20 · via 博客园 - 干炸小黄鱼
version: '3.1'

services:
  db:
    image: postgres:13.1
    container_name: com_db
    environment:
      POSTGRES_USER: root
      POSTGRES_PASSWORD: db123
      POSTGRES_DB: db
    volumes:
      - /opt/work/DDDDD/platform/com_db/db_data:/var/lib/postgresql/data
      - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
    restart: unless-stopped
    privileged: true
    logging:
      driver: "json-file"
      options:
        max-size: "10m"

  redis:
    image: redis:alpine
    volumes:
      - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
    restart: unless-stopped
    command: --requirepass "db123"
    privileged: true
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
  web:
    image: web_py38:v106
    command: sh -c 'cd /web/DDDDD && export FLASK_APP=sites && flask create-db && flask init-db && uwsgi /web/uwsgi.ini'
    volumes:
      - .:/web
      - /root/.ssh:/root/.ssh
      - /data:/data
      - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
    depends_on:
      - redis
    restart: unless-stopped
    privileged: true
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
  schedulers:
    image: web_py38:v106
    command: sh -c 'cd /web/DDDDD && python -u -m sites.scripts.schedulers'
    volumes:
      - .:/web
      - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
      - /root/.ssh:/root/.ssh
    depends_on:
      - web
    restart: unless-stopped
    privileged: true
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
networks:
  default:
    ipam:
      driver: default
      config:
        - subnet: 10.254.{{net_id}}.0/24

posted @ 2024-09-20 10:51  干炸小黄鱼  阅读(33)  评论()    收藏  举报