Files
appstore-1panel/apps/rust-srec/0.1.1/docker-compose.yml
T

71 lines
2.0 KiB
YAML

networks:
1panel-network:
external: true
services:
rust-srec-backend:
image: ghcr.io/hua0512/rust-srec:v0.1.2
container_name: backend-${CONTAINER_NAME}
restart: always
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_API}:8080
env_file:
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
- ${ENV_FILE:-/etc/1panel/envs/default.env}
volumes:
- ${RUST_REC_DATA_ROOT_PATH}/data:/app/data
- ${RUST_REC_DATA_ROOT_PATH}/output:/app/output
- ${RUST_REC_ROOT_PATH}/config:/app/config
- ${RUST_REC_ROOT_PATH}/logs:/app/logs
- ${RUST_REC_ROOT_PATH}/tmp:/tmp
environment:
- TZ=Asia/Shanghai
- RUST_LOG=${RUST_LOG:-info}
- DATABASE_URL=${DATABASE_URL:-sqlite:///app/data/rust-srec.db}
- API_PORT=8080
- API_BIND_ADDRESS=0.0.0.0
- ACCESS_TOKEN_EXPIRATION_SECS=${ACCESS_TOKEN_EXPIRATION_SECS:-3600}
- REFRESH_TOKEN_EXPIRATION_SECS=${REFRESH_TOKEN_EXPIRATION_SECS:-604800}
- MIN_PASSWORD_LENGTH=${MIN_PASSWORD_LENGTH:-8}
- HTTP_PROXY=${HTTP_PROXY:-}
- HTTPS_PROXY=${HTTP_PROXY:-}
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/api/health/live" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
rust-rec-frontend:
depends_on:
rust-srec-backend:
condition: service_healthy
image: ghcr.io/hua0512/rust-srec-frontend:v0.1.1
container_name: ${CONTAINER_NAME}
labels:
createdBy: "Apps"
restart: always
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:80
env_file:
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
- ${ENV_FILE:-/etc/1panel/envs/default.env}
environment:
- TZ=Asia/Shanghai
- BACKEND_URL=${BACKEND_URL:-http://rust-srec-backend:8080}
- COOKIE_SECURE=${COOKIE_SECURE:-}
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"