# before running docker-compose up for the first time, # either do a pull: # docker-compose pull # or do a build: # GIT_HASH $(git rev-parse --short HEAD) docker-compose up --detach # subsequently you should only need to run: # docker-compose up --detach # force a full re-build with no cache from previous builds: # docker-compose build --build-arg GIT_HASH $(git rev-parse --short HEAD) --parallel --no-cache # to stop: # docker-compose down version: "3.4" services: server: env_file: ./server/docker-dev.env image: docker.io/compdem/polis-server:${TAG} build: context: ./server dockerfile: Dockerfile depends_on: - "postgres" - "file-server" networks: - "polis-net" # Scale the server container to a given number of instances. scale: 1 math: container_name: polis-math env_file: ./math/docker-dev.env image: docker.io/compdem/polis-math:${TAG} depends_on: - "postgres" build: context: ./math networks: - "polis-net" postgres: container_name: polis-postgres env_file: ./server/docker-db-dev.env image: docker.io/compdem/polis-postgres:${TAG} restart: always build: context: ./server dockerfile: Dockerfile-db networks: - "polis-net" volumes: - "backups:/backups" - "postgres:/var/lib/postgresql/data" nginx-proxy: container_name: polis-nginx-proxy image: docker.io/compdem/polis-nginx-proxy:${TAG} build: context: ./file-server dockerfile: nginx.Dockerfile environment: - TAG depends_on: - "server" networks: - "polis-net" ports: - ${HTTP_PORT:-80}:${HTTP_PORT:-80} - ${HTTPS_PORT:-443}:${HTTPS_PORT:-443} file-server: container_name: polis-file-server image: docker.io/compdem/polis-file-server:${TAG} build: context: ./ dockerfile: file-server/Dockerfile args: GIT_HASH: "${GIT_HASH}" networks: - "polis-net" networks: polis-net: volumes: backups: postgres: