Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
WSL0809 committed May 27, 2024
1 parent 177475a commit f715b2c
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions deploy/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
services:
web:
image: registry.cn-shanghai.aliyuncs.com/myyz/yuezisaas:0.1beta
command: ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "20245", "--workers", "4"]
ports:
- "20245:20245"
depends_on:
db:
condition: service_healthy
environment:
- SHOWDOCS=${SHOWDOCS}
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
networks:
mynet1:
ipv4_address: 172.19.0.2
hostname: yzzy
db:
image: registry.cn-shanghai.aliyuncs.com/myyz/yuezisaas:db
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
command: ["-c", "max_connections=2500","-c", "shared_buffers=1024MB"]
networks:
mynet1:
ipv4_address: 172.19.0.3
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5

volumes:
postgres_data:

networks:
mynet1:
ipam:
config:
- subnet: 172.19.0.0/16

0 comments on commit f715b2c

Please sign in to comment.