Sign inSign up

lincenying/api-bun-postgre

By lincenying

•Updated about 2 months ago

Image
0

471

lincenying/api-bun-postgre repository overview

git:

https://github.com/lincenying/mmf-blog-api-elysia-postgre⁠

.env

POSTGRES_DIR=postgresql数据库路径

# 如果是初始化新的数据库, 密码可随意设置, 如果数据库路径已经有数据, 需设置成之前初始化时的密码
POSTGRES_HOST=POSTGRES主机地址,默认值:postgres
POSTGRES_PORT=POSTGRES主机端口,默认值:5432
POSTGRES_DB=POSTGRES数据库名,默认值:database_name
POSTGRES_USER=POSTGRES数据库用户名,默认值:postgres
POSTGRES_PASSWORD=POSTGRES密码,默认值:POSTGRES_password

docker-compose

services:
  api:
    container_name: dc-api-bun-postgre
    image: lincenying/api-bun-postgre:latest
    env_file:
      - .env
    environment:
      NODE_ENV: production
      POSTGRES_HOST: ${POSTGRES_HOST:-postgres}
      POSTGRES_PORT: ${POSTGRES_PORT:-5432}
      POSTGRES_USER: ${POSTGRES_USER:-postgres}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-POSTGRES_password}
      POSTGRES_DB: ${POSTGRES_DB:-database_name}
    extra_hosts:
      - 'host.docker.internal:host-gateway'
    ports:
      - 4080:4080
    depends_on:
      postgres:
        condition: service_healthy
    volumes:
      - ./uploads:/app/uploads
      - ./.data:/app/.data
      # - ./config/api-bun-postgre.production.yaml:/app/config/production.yaml:ro
    networks:
      - webnet
    restart: unless-stopped

Tag summary

Content type

Image

Digest

sha256:7ada6d4ae…

Size

105.8 MB

Last updated

about 2 months ago

docker pull lincenying/api-bun-postgre:1.26.0804