commit 970b53670d21f28eb66aed87d70f56a735ec55c3 Author: status404 Date: Tue Oct 18 10:29:17 2022 -0400 Dockerfile diff --git a/Docker/Dockerfile b/Docker/Dockerfile new file mode 100644 index 0000000..35a44d9 --- /dev/null +++ b/Docker/Dockerfile @@ -0,0 +1,21 @@ +FROM fedora:36 + +LABEL name="Tracd Standalone Server" +LABEL project="tracd" + +EXPOSE 8055 + +ENV USER_UID=2000 +ENV USER_GID=2000 + +RUN dnf -y install trac httpd-tools ;\ + dnf -y clean all + +RUN useradd --shell /sbin/nologin --create-home --home-dir /home/trac --uid $USER_UID trac + +WORKDIR /home/trac +USER trac + +#htpasswd .htpasswd user +CMD /usr/sbin/tracd --port 8055 --basic-auth="*,.htpasswd,realm" $(ls -d */) + diff --git a/README.md b/README.md new file mode 100644 index 0000000..d7b29c8 --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +# Intro + +[Trac](https://trac.edgewall.org/) is a minimalistic approach to web-based management of software projects. Its goal is to simplify effective tracking and handling of software issues, enhancements and overall progress. + +Tracd running as a Standalone Server with [htpasswd](https://trac.edgewall.org/wiki/TracStandalone#BasicAuthorization:Usingahtpasswdpasswordfile) authentication enabled. + +# Usage + +The container run tracd service with UID=2000, expose 8055 port and mount /home/trac directory from host to tracd for projects. + +Here are some example snippets to help you get started creating a container. + +## docker-compose + +```yaml +version: "3" +services: + server: + image: bitdeals/trac:latest + environment: + - USER_UID=2000 + - USER_GID=2000 + volumes: + - /home/trac:/home/trac + ports: + - "8055:8055" +``` + +## docker cli + +```sh +docker run -d \ + -e USER_UID=2000 \ + -e USER_GID=2000 \ + -v /home/trac:/home/trac \ + -p 8055:8055 \ + bitdeals/trac +``` + +# Parameters + +Container images are configured using parameters passed at runtime. + +|Parameter|Function| +|:--------|:-------| +|-p 8055|the port number to bind to| +|-e USER_UID=|tracd proccess UID| +|-e USER_GID=|tracd proccess GID| + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f8f89bb --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +version: "3" + +networks: + trac: + external: false + +services: + server: + image: bitdeals/trac:1.5.3-fedora36 + build: ./Docker + container_name: trac + environment: + - USER_UID=2000 + - USER_GID=2000 + restart: always + networks: + - trac + volumes: + - /home/trac:/home/trac + ports: + - "8055:8055"