GithubHelp home page GithubHelp logo

andygeers / teamcity-docker-compose Goto Github PK

View Code? Open in Web Editor NEW

This project forked from egregors/teamcity-docker-compose

1.0 1.0 0.0 498 KB

Compose to create working TeamCity server with PostgreSQL and Agents

License: GNU General Public License v3.0

Makefile 8.61% Dockerfile 38.53% Shell 52.86%

teamcity-docker-compose's Introduction

teamcity-docker-compose

Compose to create working TeamCity server with PostgreSQL and Agents

state ssl

This configuration use only official images:

teamcity server, teamcity agent, postgres, traefik

How to use

Clone this repository or download the zip.

git clone https://github.com/egregors/teamcity-docker-compose.git

Configuration

All you need is to set a few ENV variables in the example.env file.

Set your Postgres username and password in env.example

Set your VIRTUAL_HOST and ACME credential (LETSENCRYPT_HOST, LETSENCRYPT_EMAIL)

After all rename env.example to .env

Don't push .env file in public repositories!

It's all. PostgreSQL already configured according to the JetBrains recommendations

HTTPs support

HTTPs entry point is enabled by default thanks to traefik

If you don't need HTTPs support – use docker-compose-nossl.yml

Build and setup

Next, build the images: make build

or

docker-compose -f docker-compose.yml build

Now you may start up the service and continue configuring settings in Web Interface: make up

or

mkdir -p /opt/traefik && touch /opt/traefik/acme.json && chmod 600 /opt/traefik/acme.json
docker-compose -f docker-compose.yml up -d && docker-compose -f docker-compose.yml logs -f -t --tail=10

After initialisation Web Interface will be available on https://yourdockerhost/

Setup DB

Open https://yourdockerhost/

Set PostgreSQL as database type, download JDBC driver

Alt text

Configure DB connection:

Alt text

Authorize your Agent:

Alt text

Done, TeamCity ready to work.

Scaling

Scaling your workers (agents) supported as well. Just use docker-compose scale command:

docker-compose scale teamcity-agent=3

Keep in mind: currently, agents are stateless

Backup / restore

You may use JetBrains way to backup or restore your server

Update

If you see a notice that a new version is available, you may update your TeamCity that way:

use make (set your compose file name in Makefile, by default it is docker-compose.yml)

make update

or

# stop and remove old containers
docker-compose stop
docker-compose down --rmi all

# build new version
docker-compose build --pull --no-cache

# create and up new containers
docker-compose up -d

After an update, you need to reauthorize your agents.

Updating maintenance

Sometimes, during update you may get «maintenance is required» message instead of login page. It's ok! To login in a maintenance mode you need to enter an authentication token. You may find it in the logs: docker-compose logs -f

Try to find something like this:

teamcity-server_1                    | [TeamCity] Administrator can login from web UI using authentication token: 8755994969038184734

Platform-specific agents

You can use my preconfigured custom agents with already installed necessary dependencies

Python 3 | Node.js 11, yarn 1.15

Agent info

Ruby | Bundle

Agent info

Contributing

Bug reports, bug fixes and new features are always welcome. Please open issues and submit pull requests for any new code.

teamcity-docker-compose's People

Contributors

alexboor avatar c-pro avatar egregors avatar lamak avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.