Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Update to latest Torrust + fix various documentation bugs #1

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# torrust-docker
![GitHub CI](https://github.com/zorlin/torrust-docker/actions/workflows/image.yml/badge.svg)

It's [Torrust](https://torrust.com), in Docker. Cool!

Expand All @@ -13,13 +14,13 @@ Check out a copy of this repository.

```
git clone https://github.com/zorlin/torrust-docker
cd torrust-installer
cd torrust-docker
```

You'll need to generate some configuration files with which to run Torrust.

```
# Replace your.demain with your domain name in the Caddyfile
# Replace your.domain with your domain name in the Caddyfile
# Eg: 's/example.com/torrust.com/g'
sed -i 's/example.com/your.domain/g' Caddyfile

Expand All @@ -33,20 +34,24 @@ docker run --rm zorlin/torrust-backend:latest > backend-config.toml
# Adjust the configuration to reflect our Docker environment
sed -i 's/"127.0.0.1:1212"/"0.0.0.0:1212"/g' tracker-config.toml
sed -i 's/admin = "MyAccessToken"/token = "MyAccessToken"/g' tracker-config.toml
# Replace your.domain with your domian name
sed -i 's/localhost:6969/your.domain:6969/g' backend-config.toml
sed -i 's/localhost:1212/tracker:1212/g' backend-config.toml

# Create configuration for the frontend - replace "localhost" if needed
echo "VITE_API_BASE_URL=http://localhost/api" > frontend.env
# Create configuration for the frontend - replace "your.domain" with your domain name
echo "VITE_API_BASE_URL=https://your.domain/api" > frontend.env

# Build the frontend files
docker run --rm \
-v "$(pwd)"/frontend.env:/opt/torrust/torrust/frontend/.env \
-v "$(pwd)"/data/frontend/dist:/opt/torrust/torrust/frontend/dist \
zorlin/torrust-frontend:latest

# Create a place for backend data to be stored
mkdir -p data/backend/
```

Once you've created the configuration files and frontend build, simply bring up the service with Docker Compose;
Once you've created the configuration files and frontend build, and created a place for backend data, simply bring up the service with Docker Compose;

`docker-compose up -d`

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.7"
services:
tracker:
image: zorlin/torrust-tracker:v0.0.1
image: zorlin/torrust-tracker:v0.2.0
ports:
- "6969:6969/tcp"
- "6969:6969/udp"
Expand All @@ -13,7 +13,7 @@ services:
target: /opt/torrust/torrust-tracker/config.toml
backend:
privileged: true
image: zorlin/torrust-backend:v0.0.1
image: zorlin/torrust-backend:v0.2.0
expose:
- 3000
volumes:
Expand Down
2 changes: 1 addition & 1 deletion torrust-frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.14
FROM alpine:3.15.4

# Install necessary packages
RUN apk add --no-cache git bash nodejs npm
Expand Down
4 changes: 2 additions & 2 deletions torrust-tracker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.14 as build
FROM alpine:3.15.4 as build

# Install necessary packages
RUN apk add --no-cache git curl rust cargo bash libressl-dev sqlite-dev
Expand All @@ -12,7 +12,7 @@ WORKDIR /opt/torrust/torrust-tracker
RUN cargo build --release

# Now build our real container :)
FROM alpine:3.14
FROM alpine:3.15.4

# Install necessary packages
RUN apk add --no-cache sqlite-libs libgcc
Expand Down