| services: | |
| api: | |
| build: | |
| context: ./ | |
| dockerfile: Dockerfile | |
| container_name: cheminformatics-microservice-api | |
| env_file: | |
| - .env | |
| environment: | |
| - HOMEPAGE_URL=https://docs.api.naturalproducts.net | |
| - RELEASE_VERSION=v2.6.0 | |
| - WORKERS=2 | |
| - CMS_INTERNAL_AUTH_TOKEN=${CMS_INTERNAL_AUTH_TOKEN} | |
| ports: | |
| - "8000:80" | |
| volumes: | |
| - ./app:/code/app | |
| - ./requirements.txt:/code/requirements.txt | |
| healthcheck: | |
| test: curl -f http://localhost:8000/latest/chem/health || exit 1 | |
| interval: 90s | |
| timeout: 10s | |
| retries: 20 | |
| start_period: 60s | |
| restart: unless-stopped | |
| security_opt: | |
| - no-new-privileges:true | |
| networks: | |
| - cm_network | |
| web: | |
| build: | |
| context: ./frontend | |
| dockerfile: ./Dockerfile | |
| container_name: cheminformatics-microservice-frontend | |
| environment: | |
| - VITE_API_URL=http://localhost:8000/latest | |
| - NODE_ENV=development | |
| ports: | |
| - "3000:80" | |
| volumes: | |
| - ./frontend/src:/app/src | |
| - ./frontend/public:/app/public | |
| - ./frontend/package.json:/app/package.json | |
| - ./frontend/package-lock.json:/app/package-lock.json | |
| depends_on: | |
| - api | |
| restart: unless-stopped | |
| networks: | |
| - cm_network | |
| prometheus: | |
| image: prom/prometheus:latest | |
| container_name: prometheus | |
| ports: | |
| - "9090:9090" | |
| volumes: | |
| - ./prometheus_data/prometheus.yml:/etc/prometheus/prometheus.yml:ro | |
| - prometheus_data:/prometheus | |
| command: | |
| - '--config.file=/etc/prometheus/prometheus.yml' | |
| - '--storage.tsdb.path=/prometheus' | |
| - '--web.console.libraries=/usr/share/prometheus/console_libraries' | |
| - '--web.console.templates=/usr/share/prometheus/consoles' | |
| restart: unless-stopped | |
| networks: | |
| - cm_network | |
| grafana: | |
| image: grafana/grafana:latest | |
| container_name: grafana | |
| user: "472" | |
| ports: | |
| - "3001:3000" | |
| volumes: | |
| - grafana_data:/var/lib/grafana | |
| environment: | |
| - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:?Set GRAFANA_ADMIN_PASSWORD in .env} | |
| - GF_USERS_ALLOW_SIGN_UP=false | |
| restart: unless-stopped | |
| depends_on: | |
| - prometheus | |
| networks: | |
| - cm_network | |
| volumes: | |
| prometheus_data: | |
| driver: local | |
| grafana_data: | |
| driver: local | |
| networks: | |
| cm_network: | |
| name: cm_network | |
| driver: bridge |