Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make docker work #17

Merged
merged 8 commits into from
Sep 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ RUN apt-get update && \
apt-get -y install nodejs && \
apt-get -y clean

COPY . /build-window
RUN gem install bundler
RUN mkdir /build-window
COPY ./Gemfile /build-window
RUN cd /build-window && bundle install

WORKDIR /build-window

RUN bundle install
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ See https://github.com/Smashing/smashing/wiki for more details.

### Authentication

Place your API credentials in a `.env` file at the root of the project. (Please note that authentication is currently only supported for Go CD and Jenkins.) Example:
Place your API credentials in a `.env` file at the root of the project. (Please note that authentication is currently only supported for Go CD, Jenkins and TeamCity.) Example:

#### Go

Expand All @@ -63,6 +63,11 @@ JENKINS_USER=user
JENKINS_TOKEN=password
```

#### TeamCity

TEAM_CITY_USER=user
TEAM_CITY_PASSWORD=password

## Different Base URLs

If you have multiple build servers of the same type you'd like to keep an eye on you can specify the `baseUrl` for each build:
Expand Down
8 changes: 7 additions & 1 deletion config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ end
if Builds::BUILD_CONFIG['teamCityBaseUrl']
require 'teamcity'
TeamCity.configure do |config|
config.endpoint = Builds::BUILD_CONFIG['teamCityBaseUrl'] + '/app/rest?guest=1'
if ENV['TEAM_CITY_USER']
config.endpoint = Builds::BUILD_CONFIG['teamCityBaseUrl'] + '/app/rest'
config.http_user = ENV['TEAM_CITY_USER']
config.http_password = ENV['TEAM_CITY_PASSWORD']
else
config.endpoint = Builds::BUILD_CONFIG['teamCityBaseUrl'] + '/app/rest?guest=1'
end
end
end

Expand Down
17 changes: 11 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
build-window:
build: .
ports:
- "3030:3030"
- "3031:3031"
command: smashing start
version: "3"
services:
build-window:
build: .
image: rouanw/build-window:latest
volumes:
- .:/build-window
ports:
- "3030:3030"
- "3031:3031"
command: smashing start
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great - thanks!