浪子

希望以后可以有影音分享的功能

11小时前
浪子

docker compose 启动

version: '3.8'

services:
  db:
    image: postgres:14-alpine
    restart: always
    environment:
      POSTGRES_USER: m-moments
      POSTGRES_PASSWORD: m-moments
      POSTGRES_DB: m-moments
    networks:
      - moments_network
    volumes:
      - ./data:/var/lib/postgresql/data/
      - ./sql/schema.sql:/docker-entrypoint-initdb.d/init.sql
  web:
    image: kingwrcy/m-moments:latest
    restart: always
    environment:
      - DB_HOST=db
      - DB_PORT=5432
      - DB_NAME=m-moments
      - DB_USER=m-moments
      - DB_PASSWORD=m-moments  
    networks:
      - moments_network
    ports:
      - '8787:8787'
    depends_on:
      - db
    volumes:
      - ./upload:/app/upload

networks:
  moments_network:

6天前
mblog.club@2024