diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0756002..49358e5 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -53,7 +53,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - file: Dockerfile + file: ./docker/Dockerfile push: true platforms: linux/amd64 tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ccec83d..7d11713 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,7 +61,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - file: Dockerfile + file: ./docker/Dockerfile push: true platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/s390x,linux/ppc64le tags: ${{ steps.meta.outputs.tags }} diff --git a/Dockerfile b/docker/Dockerfile similarity index 100% rename from Dockerfile rename to docker/Dockerfile diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000..02366ab --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,45 @@ +services: + polaris: + image: ghcr.io/simon-ding/polaris:latest + restart: always + environment: + - PUID=1000 + - PGID=1000 + - TZ=${TIMEZONE} + volumes: + - ${CONFIGURATION_FILE_LOCATION}/polaris:/app/data + - ${DOWNLOAD_LOCATION}:/downloads + - ${MEDIA_LOCATION}:/data + env_file: + - .env + ports: + - 8080:8080 + transmission: + image: lscr.io/linuxserver/transmission:latest + environment: + - PUID=1000 + - PGID=1000 + - TZ=${TIMEZONE} + volumes: + - ${CONFIGURATION_FILE_LOCATION}/transmission:/config + - ${DOWNLOAD_LOCATION}:/downloads + env_file: + - .env + ports: + - 9091:9091 + - 51413:51413 + - 51413:51413/udp + prowlarr: + image: lscr.io/linuxserver/prowlarr:latest + container_name: prowlarr + environment: + - PUID=1000 + - PGID=1000 + - TZ=${TIMEZONE} + volumes: + - ${CONFIGURATION_FILE_LOCATION}/prowlar:/config + env_file: + - .env + ports: + - 9696:9696 + restart: unless-stopped \ No newline at end of file diff --git a/docker/example.env b/docker/example.env new file mode 100644 index 0000000..48b5bd9 --- /dev/null +++ b/docker/example.env @@ -0,0 +1,12 @@ +#下载路径 +DOWNLOAD_LOCATION=/downloads + +#媒体数据存储路径,也可以启动自己配置webdav存储 +MEDIA_LOCATION=/data + +#程序配置文件存放路径 +CONFIGURATION_FILE_LOCATION=./config + +#时区 +TIMEZONE=Asia/Shanghai + diff --git a/entrypoint.sh b/entrypoint.sh index f94cec0..c72231d 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -9,4 +9,4 @@ chown -R "${PUID}:${PGID}" /app/data umask ${UMASK:-022} cd /app -exec gosu "${PUID}:${PGID}" /app/polaris \ No newline at end of file +exec gosu "${PUID}:${PGID}" /app/polaris -port ${PORT:-8080} \ No newline at end of file