version: '3.8' services: python: build: context: ./ dockerfile: ./Dockerfile restart: always environment: - DATABASE_URL=postgresql://postgres:postgres@db:5432/mini12306_python - REDIS_URL=redis - SERVER_LIB_URL=http://py12306.learnerhub.net ports: - "3002:3002" depends_on: - db - redis volumes: - /var/log/mini12306_python:/app/logs redis: image: redis:alpine container_name: 12306_redis volumes: - redis_data:/data db: image: postgres:15 container_name: 12306_postgres restart: always environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: mini12306_python volumes: - postgres_data:/var/lib/postgresql/data volumes: postgres_data: redis_data: