76 lines
2.0 KiB
YAML
76 lines
2.0 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
postgres:
|
|
container_name: imk-postgres-dev
|
|
image: postgres:14-alpine
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: imk_db
|
|
volumes:
|
|
- postgres_data_dev:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
networks:
|
|
- imk_network_dev
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
backend:
|
|
container_name: imk-backend-dev
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.dev
|
|
volumes:
|
|
- ./src:/app/src:delegated
|
|
- ./prisma:/app/prisma:delegated
|
|
- ./package.json:/app/package.json:delegated
|
|
- ./package-lock.json:/app/package-lock.json:delegated
|
|
- ./tsconfig.json:/app/tsconfig.json:delegated
|
|
- ./nest-cli.json:/app/nest-cli.json:delegated
|
|
- node_modules:/app/node_modules
|
|
environment:
|
|
- NODE_ENV=production
|
|
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/imk_db?schema=public
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- POSTGRES_DB=imk_db
|
|
- JWT_SECRET=${JWT_SECRET}
|
|
- AWS_REGION=${AWS_REGION}
|
|
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
|
|
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
|
|
- AWS_S3_BUCKET_NAME=${AWS_S3_BUCKET_NAME}
|
|
- AWS_ENDPOINT_URL=${AWS_ENDPOINT_URL}
|
|
- SMTP_HOST=${SMTP_HOST}
|
|
- SMTP_PORT=${SMTP_PORT}
|
|
- SMTP_USER=${SMTP_USER}
|
|
- SMTP_PASS=${SMTP_PASS}
|
|
- EMAIL_FROM=${EMAIL_FROM}
|
|
- FRONTEND_URL=${FRONTEND_URL}
|
|
ports:
|
|
- "3000:3000"
|
|
- "9229:9229"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
networks:
|
|
- imk_network_dev
|
|
restart: unless-stopped
|
|
command: ["/app/scripts/start-dev.sh"]
|
|
tty: true
|
|
stdin_open: true
|
|
# command: sh -c "rm -rf /app/dist && npm run start:dev"
|
|
|
|
networks:
|
|
imk_network_dev:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
postgres_data_dev:
|
|
node_modules:
|