This repository contains scripts to set up and configure TeamCity server and agent in a Docker environment.
Before proceeding with the setup, please note:
-
Sensitive Information:
- Replace all placeholder values (e.g.,
your-domain.com,your-email@example.com) with your actual values
- Replace all placeholder values (e.g.,
-
SSL Certificates:
- SSL certificates and keys are automatically generated during setup
-
SSH Keys:
- SSH keys are used for secure access to the server
Run the host setup script to install and configure necessary dependencies:
sudo ./setup-host.shThis script will:
- Install required packages (Go, Python, Java, Docker)
- Configure system PATH
- Set up SSH keys
- Install and configure Docker
-
Configure the domain in
setup-teamcity.sh:- Update
DOMAINvariable with your domain - Update
EMAILvariable with your email (for SSL)
- Update
-
Run the TeamCity server setup:
sudo ./setup-teamcity.shThis will:
- Set up TeamCity server using Docker Compose
- Configure Nginx as a reverse proxy
- Create and enable systemd service
- Start TeamCity server
To enable HTTPS:
sudo ./setup-ssl.sh- Update the TeamCity URL in
setup-teamcity-agent.shif needed - Run the agent setup:
sudo ./setup-teamcity-agent.shThis will:
- Download and install the TeamCity agent
- Configure the agent to connect to your TeamCity server
- Set up and enable systemd service
- Start the agent
- TeamCity Server logs:
docker compose logs -f - Agent logs:
journalctl -u teamcity-agent.service -f - Restart services:
- Server:
sudo systemctl restart teamcity.service - Agent:
sudo systemctl restart teamcity-agent.service
- Server: