2024-08-12 19:55:59 +08:00
|
|
|
#version: '3.9'
|
2024-08-13 14:52:01 +08:00
|
|
|
name: surl
|
2024-07-23 17:54:15 +08:00
|
|
|
networks:
|
|
|
|
surl-network:
|
2024-08-12 14:49:56 +08:00
|
|
|
external: false
|
2024-07-23 17:54:15 +08:00
|
|
|
services:
|
|
|
|
surl:
|
2024-08-13 14:52:01 +08:00
|
|
|
build: .
|
2024-08-12 21:28:05 +08:00
|
|
|
restart: unless-stopped
|
2024-08-12 19:55:59 +08:00
|
|
|
depends_on:
|
2024-08-13 14:52:01 +08:00
|
|
|
redis_forsurl:
|
|
|
|
condition: service_started
|
|
|
|
postgres_forsurl:
|
|
|
|
condition: service_healthy
|
2024-07-23 17:54:15 +08:00
|
|
|
ports:
|
2024-07-24 09:34:33 +08:00
|
|
|
- "127.0.0.1:18888:18888"
|
2024-07-23 17:54:15 +08:00
|
|
|
networks:
|
|
|
|
- surl-network
|
|
|
|
environment:
|
|
|
|
PROTOCOL: http
|
|
|
|
HOST: localhost
|
|
|
|
PORT: 18888
|
|
|
|
DB_HOST: postgres_forsurl
|
|
|
|
DB_PORT: 5432
|
2024-08-06 10:08:14 +08:00
|
|
|
# 更改此处密码
|
|
|
|
DB_PASS: "PASSWORD4DB"
|
2024-07-23 17:54:15 +08:00
|
|
|
REDIS_HOST: redis_forsurl
|
2024-08-06 10:08:14 +08:00
|
|
|
# change this to your secret key or it will be generated
|
|
|
|
#SECRET_KEY: ne09xhakcvoi13$>":<[].
|
2024-07-23 17:54:15 +08:00
|
|
|
redis_forsurl:
|
|
|
|
image: redis:latest
|
2024-08-13 14:52:01 +08:00
|
|
|
restart: unless-stopped
|
2024-07-23 17:54:15 +08:00
|
|
|
networks:
|
|
|
|
- surl-network
|
2024-08-12 14:49:56 +08:00
|
|
|
volumes:
|
|
|
|
- redis_forsurl_data:/data
|
2024-07-23 17:54:15 +08:00
|
|
|
postgres_forsurl:
|
|
|
|
image: postgres:latest
|
2024-08-13 14:52:01 +08:00
|
|
|
restart: unless-stopped
|
2024-07-23 17:54:15 +08:00
|
|
|
networks:
|
|
|
|
- surl-network
|
2024-07-24 09:34:33 +08:00
|
|
|
environment:
|
2024-08-06 10:08:14 +08:00
|
|
|
# 更改此处密码
|
2024-07-24 09:34:33 +08:00
|
|
|
POSTGRES_PASSWORD: "PASSWORD4DB"
|
2024-08-12 14:49:56 +08:00
|
|
|
PGDATA: /var/lib/postgresql/data/pgdata
|
|
|
|
volumes:
|
|
|
|
- postgres_forsurl_data:/var/lib/postgresql/data
|
2024-08-13 14:52:01 +08:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
|
|
interval: 5s
|
|
|
|
retries: 5
|
|
|
|
start_period: 5s
|
|
|
|
timeout: 5s
|
2024-08-12 14:49:56 +08:00
|
|
|
volumes:
|
|
|
|
redis_forsurl_data: {}
|
|
|
|
postgres_forsurl_data: {}
|