--- services: strapi_development: build: context: . target: development args: NODE_ENV: development pull_policy: never image: 'strapi:${CMS_STRAPI_TAG:-dev}' restart: unless-stopped hostname: strapi_development environment: &strapi_env DATABASE_CLIENT: postgres DATABASE_HOST: ${CMS_POSTGRES_HOST:-postgres} DATABASE_PORT: ${CMS_POSTGRES_PORT:-5432} DATABASE_NAME: strapi_development DATABASE_USERNAME: ${CMS_POSTGRES_USER:-postgres} DATABASE_PASSWORD: ${CMS_POSTGRES_PASSWORD:-postgres} JWT_SECRET: ${CMS_STRAPI_JWT_SECRET:-replace-with-random-value} ADMIN_JWT_SECRET: ${CMS_STRAPI_ADMIN_JWT_SECRET:-replace-with-random-value} APP_KEYS: ${CMS_STRAPI_APP_KEYS:-replace-with-random-value} NODE_ENV: development depends_on: postgres: condition: service_healthy volumes: - ./cms/package.json:/opt/package.json - ./cms/yarn.lock:/opt/yarn.lock - ./cms/src:/opt/app/src - ./cms/config:/opt/app/config - ./cms/public/uploads:/opt/app/public/uploads ports: - ${CMS_STRAPI_PORTS:-1337:1337} strapi_production: build: context: . target: production args: NODE_ENV: production pull_policy: never image: 'strapi:${CMS_STRAPI_PRODUCTION_TAG:-prod}' restart: unless-stopped hostname: strapi_production profiles: - production environment: <<: *strapi_env NODE_ENV: production depends_on: postgres: condition: service_healthy ports: - ${CMS_STRAPI_PRODUCTION_PORTS:-1338:1337}