Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Dockerization #34

Open
benjaoholeguy opened this issue Dec 23, 2021 · 1 comment
Open

API Dockerization #34

benjaoholeguy opened this issue Dec 23, 2021 · 1 comment

Comments

@benjaoholeguy
Copy link

Hi,
This is not an issue but I'm not sure where else should I put this request. Any of you have dockerized the API?

@benjaoholeguy
Copy link
Author

Just in case anyone might be interested (NodeJS + Mongo):

version: '3.4'
services: 
  app: 
    image: app
    container_name: api-test
    restart: always
    build: .
    ports: 
      - 3000:3000
    volumes: ['./:/usr/src/app']
    networks:
      - staging
  mongo: 
    container_name: mongo-cho
    image: mongo
    env_file:
        - .env
    environment:
      AUTH: "yes"
      MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
      MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
      MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE}
    volumes:
      - ./.docker/mongodb/mongod.conf:/etc/mongod.conf
      - ./.docker/mongodb/data/db/:/data/db/
      - ./.docker/mongodb/data/log/:/var/log/mongodb/
    networks:
      - staging
    ports:
      - '27017:27017'
    command: ["-f", "/etc/mongod.conf"]
networks:
    staging:
        driver: bridge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant