steps:
  - name: build
    image: docker:dind
    environment:
      COMPOSE_PROJECT_NAME: ${CI_REPO_OWNER,,}-${CI_REPO_NAME,,}-${CI_COMMIT_BRANCH//\//-}
      LETSENCRYPT_HOST: librodrome.org
      SERVICE_3000_TAGS: urlprefix-librodrome.org:443/*
      NUXT_PUBLIC_SITE_URL: https://librodrome.org
      NUXT_ADMIN_PASSWORD:
        from_secret: NUXT_ADMIN_PASSWORD
      NUXT_ADMIN_SECRET:
        from_secret: NUXT_ADMIN_SECRET
    commands:
    - docker compose -f docker/docker-compose.yml -f docker/docker-compose.fabio.yml up --build -d
    volumes:
    - ${DOCKER_SOCKET_LOCATION:-/var/run/docker.sock}:/var/run/docker.sock
    when:
    - branch: main
      event: push
