Dynavera/compose/prod/docker-compose.yml
Viswamedha Nalabotu 03490762be Fixed core issues
2025-12-20 20:40:23 +00:00

83 lines
No EOL
2.1 KiB
YAML

services:
fyp-postgres:
image: postgres:15-alpine
restart: unless-stopped
env_file:
- ../../.env
environment:
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- proxy
fyp-web:
image: ${IMAGE}
restart: unless-stopped
deploy:
mode: replicated
replicas: ${REPLICAS}
env_file:
- ../../.env
labels:
- "traefik.enable=true"
- "traefik.http.routers.fyp-web.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.fyp-web.entrypoints=${ENTRYPOINT}"
- "traefik.http.routers.fyp-web.tls.certresolver=${CERTRESOLVER}"
- "traefik.http.services.fyp-web.loadbalancer.server.port=${PORT}"
- "com.centurylinklabs.watchtower.enable=true"
- "com.centurylinklabs.watchtower.scope=fyp"
volumes:
- ../../static:/app/static
- ../../media:/app/media
networks:
- proxy
fyp-watchtower:
image: containrrr/watchtower
command:
- "--scope=fyp"
- "--label-enable"
- "--interval"
- "30"
- "--rolling-restart"
environment:
- WATCHTOWER_CLEANUP=true
- REPO_USER=${GITLAB_USER}
- REPO_PASS=${GITLAB_PASS}
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
fyp-runner:
image: gitlab/gitlab-runner:${GITLAB_RUNNER_IMAGE_TAG}
restart: unless-stopped
environment:
- CI_SERVER_URL=${GITLAB_SERVER_URL}
- REGISTRATION_TOKEN=${GITLAB_RUNNER_REGISTRATION_TOKEN}
- RUNNER_EXECUTOR=docker
- RUNNER_RUN_UNTAGGED=true
- RUNNER_TAG_LIST=
- DOCKER_TLS_CERTDIR=
- DOCKER_IMAGE=${GITLAB_RUNNER_DOCKER_IMAGE}
volumes:
- gitlab-runner-config:/etc/gitlab-runner
- gitlab-machine-config:/root/.docker/machine
- /var/run/docker.sock:/var/run/docker.sock
command:
- run
- "--working-directory=/home/gitlab-runner"
networks:
proxy:
external: true
volumes:
gitlab-runner-config:
name: gitlab-runner-config
gitlab-machine-config:
name: gitlab-machine-config
postgres_data:
name: fyp_postgres_data