version: '2.1' services: cantstandya-server: container_name: cantstandya-server build: context: ../cantstandya-server dockerfile: Dockerfile-prod ports: - '1337:3030' # expose ports - HOST:CONTAINER environment: - BASIC_DB_TEST=postgres://postgres:postgres@cantstandya-db:5432/cantstandya_test - BASIC_DB=postgres://postgres:postgres@cantstandya-db:5432/cantstandya_prod - TOKEN_SECRET=changeme - NODE_ENV=production depends_on: cantstandya-db: condition: service_healthy links: - cantstandya-db cantstandya-db: container_name: cantstandya-db build: context: ../cantstandya-server/src/db ports: - '5433:5432' # expose ports - HOST:CONTAINER environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres healthcheck: test: exit 0 cantstandya-client: container_name: cantstandya-client build: context: ../cantstandya-client dockerfile: Dockerfile-prod ports: - '3007:3000' # expose ports - HOST:CONTAINER environment: - REACT_APP_SERVER_URL=${REACT_APP_SERVER_URL} - NODE_ENV=production depends_on: cantstandya-server: condition: service_started links: - cantstandya-server nginx: container_name: nginx build: ./nginx/ restart: always ports: - 80:80 depends_on: cantstandya-server: condition: service_started cantstandya-client: condition: service_started links: - cantstandya-client - cantstandya-server