version: '3.5' services: mongo: image: mongo:latest restart: always environment: MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_PASSWORD: example volumes: - mongo-data:/data/db mongo-express: image: mongo-express:latest restart: always ports: - 8081:8081 environment: ME_CONFIG_MONGODB_ADMINUSERNAME: root ME_CONFIG_MONGODB_ADMINPASSWORD: example ME_CONFIG_MONGODB_SERVER: mongo ME_CONFIG_MONGODB_PORT: "27017" backend: image: agnes4im/mern-backend:v2.0 ports: - 9000:9000 environment: DB_URL: mongo frontend: image: agnes4im/mern-frontend:v2.0 ports: - 3000:3000 volumes: mongo-data: driver: local