volumes: data: services: gogs: image: docker.io/gogs/gogs # use the latest gogs version restart: always volumes: - data:/data - ./gogs_backup:/backup # connect a local directory to /backup to avoid volume to be created ports: - "3022:22" # Map SSH to port 3022 - "3000:3000" # Map webinterface to port 3000 environment: - SOCAT_LINK=false - RUN_CROND=false # false or true to enable cron deamon for automatic backups - BACKUP_INTERVAL=null # backup interval like 3h, 7d, 3M or null to disable