53 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| services:
 | |
|   api:
 | |
|     build:
 | |
|       context: .
 | |
|       dockerfile: Dockerfile
 | |
|     # ports:
 | |
|     #   - "${SERVER_PORT}:${SERVER_PORT}"
 | |
|     depends_on:
 | |
|       db:
 | |
|         condition: service_healthy
 | |
|       minio:
 | |
|         condition: service_healthy
 | |
|     environment:
 | |
|       NODE_ENV: production
 | |
|       DATABASE_URL: ${DATABASE_URL}
 | |
| 
 | |
|   db:
 | |
|     image: postgres:latest
 | |
|     environment:
 | |
|       POSTGRES_USER: ${DB_USER}
 | |
|       POSTGRES_PASSWORD: ${DB_PASSWORD}
 | |
|       POSTGRES_DB: ${DB_NAME}
 | |
|     # ports:
 | |
|     #   - "${DB_PORT}:5432"
 | |
|     volumes:
 | |
|       - postgres_data:/var/lib/postgresql/data
 | |
|     healthcheck:
 | |
|       test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
 | |
|       interval: 10s
 | |
|       timeout: 5s
 | |
|       retries: 5
 | |
|       start_period: 10s
 | |
| 
 | |
|   minio:
 | |
|     image: minio/minio:latest
 | |
|     # ports:
 | |
|     #   - "9000:9000"
 | |
|     #   - "9001:9001"
 | |
|     environment:
 | |
|       MINIO_ROOT_USER: ${MINIO_ROOT_USER}
 | |
|       MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
 | |
|     command: server /data --console-address ":9001"
 | |
|     volumes:
 | |
|       - minio_data:/data
 | |
|     healthcheck:
 | |
|       test: ["CMD", "mc", "ready", "local"]
 | |
|       interval: 30s
 | |
|       timeout: 20s
 | |
|       retries: 3
 | |
| 
 | |
| volumes:
 | |
|   postgres_data:
 | |
|   minio_data:
 | 
