Logo

dev-resources.site

for different kinds of informations.

docker compose : top level object must be mapping

Published at
2/6/2024
Categories
docker
containerapps
Author
rajarajacholank
Categories
2 categories in total
docker
open
containerapps
open
Author
15 person written this
rajarajacholank
open
docker compose : top level object must be mapping

I use this command to build:
docker-compose -f docker-compose-new.yml -f Dockerfile-new config and getting top level object must be mapping though I can independentally run build the image using just docker.

my docker file:
`FROM node:18.16.1-slim as dependencies

WORKDIR /app

RUN npm install -g [email protected]

RUN pnpm config set store-dir ~/.pnpm-store

COPY pnpm-lock.yaml .
RUN --mount=type=cache,target=~/.pnpm-store pnpm fetch
COPY package.json pnpm-workspace.yaml ./

============================================================================

FROM dependencies as orchestrator-client-builder

COPY client/package.json /app/client/

RUN pnpm install --offline --frozen-lockfile

COPY client/tsconfig.json client/.eslintrc.js /app/client/
COPY client/public /app/client/public
COPY client/src /app/client/src
COPY .env app/client/

RUN pnpm --filter=orchestrator-client build

============================================================================

FROM dependencies as orchestrator-server-builder

COPY server/package.json /app/server/
RUN pnpm install --offline --frozen-lockfile

RUN pnpm --filter=orchestrator-server --prod deploy pruned

COPY server/tsconfig.json server/.eslintrc.js /app/server/
COPY server/src /app/server/src

RUN pnpm --filter=orchestrator-server build

============================================================================

FROM nginx:1.24.0 as orchestrator-client

COPY client/nginx.conf /etc/nginx/conf.d/localhost.conf

COPY --from=orchestrator-client-builder \
/app/client/build /usr/share/nginx/html

============================================================================

FROM node:18.16.1-slim as orchestrator-server

WORKDIR /app

COPY --from=orchestrator-server-builder /app/pruned/node_modules \
/app/node_modules
COPY --from=orchestrator-server-builder /app/server/dist /app/dist

EXPOSE 8000

CMD ["node", "dist/src/index.js"]

============================================================================

`

docker compose file:
`
version: "3.9"
name: orchestrator

services:
db:
image: mongo:5.0.4
container_name: orchestrator-db-container
restart: always
volumes:
- /home/platform_shared_volumes/orchestrator/db:/data/db

cache:
image: redis:6.2.6
container_name: orchestrator-cache-container
restart: always
volumes:
- /home/platform_shared_volumes/orchestrator/cache:/data

base:
build:
context: .
target: dependencies
image: base:${LOCK_HASH:-latest}
profiles:
- donotstart

server:
build:
context: .
target: orchestrator-server
image: orchestrator-server:${SERVER_HASH:-latest}
depends_on:
- db
- cache
container_name: orchestrator-server-container
restart: always
environment:
- JWT_SECRET=WT_VERB_CHECKPOINT_PROGRESS
- PORT=8000
- DB_URL=mongodb://db:27017/test
- CLIENT_URL=https://dev.test.ai/dashboard
- BACKEND_URL=https://dev.test.ai
- REDIS_HOST=cache
- REDIS_PORT=6379
- EMAIL=[email protected]
- PASSWORD=test1234
- MAX_TASK_VERSION=10
- RENEW_API_URL=https://licensing.test.ai/api/licenses
- CONFIG_KEY=WeWereOnBreak
- AGENT_TYPES=single_task,single_task_attended,single_task_unattended,multiple_task,multiple_task_attended,multiple_task_unattended
- SUPPORTED_AGENT_VERSIONS=2.3.7-9.0,2.4.0-10.0,2.4.0-11.0,2.4.0-11.1

frontend:
build:
context: .
target: orchestrator-client
image: orchestrator-client:${SERVER_HASH:-latest}
depends_on:
- server
container_name: orchestrator-client-container
restart: always
ports:
- 3000:80
`

What I am missing here?!

containerapps Article's
30 articles in total
Favicon
Tackling CPU Throttling in Kubernetes for Better Application Performance
Favicon
What the Heck is Docker?
Favicon
A Step-by-Step Guide to CI/CD Pipeline for Angular App with Azure Container Apps
Favicon
Cool SHIT you can do with docker
Favicon
Deploying a stateless container on cloud run
Favicon
Dockerize Your Development: Build Reusable Features, Faster
Favicon
Docker For Beginners
Favicon
Preventing Out-of-Memory (OOM) Kills in Kubernetes: Tips for Optimizing Container Memory Management
Favicon
How and why did we improve our API hosting?
Favicon
Deploying a Java Azure Function on Azure Container Apps
Favicon
AWS App Runner: A quick start deploying Docker Container to AppRunner
Favicon
Deploying a Static Website with Docker: A Comprehensive Guide
Favicon
Day 12 of my 90-Devops Journey: CI/CD for Containerized Applications: A GitLab Guide
Favicon
How to containerize your web app- a beginner-friendly tutorial for Dockerfile
Favicon
Use LLMs in Java. An example with Merlinite, Quarkus, and Podman Desktop AI Lab
Favicon
How to Build a Container Image Running on Docker Hub.
Favicon
Android Encrypted Shared Preference access issue from new container
Favicon
What is Docker ?: Understanding the Concept of Containerization.
Favicon
How Azure Container Apps Simplify the Cloud Deployment Process
Favicon
docker compose : top level object must be mapping
Favicon
Deploying Containers with Security in mind (Beginner)
Favicon
Containerizing your Go application by using Docker
Favicon
Containerizing your Go application using Docker
Favicon
Revolutionize Your Dev Workflow: Containerization and Linux VPS Hosting for Streamlined Software Development
Favicon
Java application latency reduction and pitfalls
Favicon
A Beginner's Tour of NodePort, LoadBalancer, and Ingress Services
Favicon
Azure Container Apps: Zero to Hero
Favicon
Dev Container for React Native with Expo
Favicon
How to authenticate and register GitHub Runners hosted in Azure Container Apps with GitHub App via Azure Key Vault
Favicon
The Orchestration of The Ring

Featured ones: