I have two services, on two different GitLab repositories, deployed to the same host. I am currently using
supervisord to run all of the services. The CI/CD for each repository pushes the code to the host.
I am trying to transition to using Docker, keeping the two repositories. I set up a
Dockerfile for each service.
I have created a third repository with only a
docker-compose.yml to build and run the two services.
I am looking for a way to have the
docker-compose automatically update when I deploy one of the two repositories, instead of me having to manually do
docker-compose pull every time.
version: "3.4" services: redis: image: "redis:alpine" api: build: . command: gunicorn -c gunicorn_conf.py --bind 0.0.0.0:5000 --chdir server "app:app" --timeout 120 volumes: - .:/app ports: - "8000:8000" depends_on: - redis celery-worker: build: . command: celery worker -A server.celery_config:celery volumes: - .:/app depends_on: - redis celery-beat: build: . command: celery beat -A server.celery_config:celery --loglevel=INFO volumes: - .:/app depends_on: - redis other-service: build: . command: python other-service.py volumes: - .:/other-service depends_on: - redis