šŸ”
starhackit
  • README
  • Getting started
    • Requirements
    • Quick Start
  • Frontend
    • The Frontend
      • Npm scripts
    • Unit testing
    • End 2 End Testing
    • Multi Application
    • Production Build
    • Internationalization
    • Configuration
    • Cut and Paste detector
    • Webpack
  • Backend
    • Node Backend
      • Npm scripts
    • Development Enviromnent with docker-compose
    • Testing
      • Code Coverage
    • Configuration
    • Debugging
    • Database
    • Http Server
      • CORS
    • Authentication
      • Social Authentication
      • Local Authentication with JWT
    • Email
    • Redis
    • Api Model
      • Api Mocking
  • Deployment
    • Build, Tag and Push Docker Images
    • Releasing
    • Deploy Infrastructure with GruCloud
    • Deploy with Ansible
Powered by GitBook
On this page

Was this helpful?

  1. Backend

Development Enviromnent with docker-compose

PreviousNpm scriptsNextTesting

Last updated 4 years ago

Was this helpful?

docker-compose manages the docker containers for the various services such as Redis and Postgres on the local machine.

The file defines all dependencies to run the project

# cd server
# npm run docker:up

To check that the containers are running:

# docker ps
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS              PORTS                    NAMES
e16e6b12b427        postgres:10-alpine        "docker-entrypoint.s…"   47 hours ago        Up 47 hours         0.0.0.0:6432->5432/tcp   server_pg_1
0b24afd9defe        smebberson/alpine-redis   "/init"                  47 hours ago        Up 47 hours         0.0.0.0:7379->6379/tcp   server_redis_1

Getting a container logs:

$ docker logs server_pg_1

Destroy all containers and volumes:

$ npm run docker:destroy
docker-compose.yml