I am working on a react based web app. The app contains client, server and db on different docker containers. I have dockerfiles for each and I use a docker compose script to automate.
There is a need to use one config file for client’s Dev build and another for client’s Testing Build.
How do I make this happen?
My client dockerfile looks like this:
FROM node:13.14.0-alpine WORKDIR /app/ ENV PATH /app/node_modules/.bin:$PATH COPY package.json /app/ COPY package-lock.json /app/ RUN npm install COPY . /app/ EXPOSE 3000 CMD [ "npm", "start" ]
My docker-compose.yml looks like this:
services: test_client: build: ./client stdin_open: true ports: - "3000:3000" depends_on: - test_db test_server: blah dashboard_db: blah
Assume that the config files reside in the root client folder.