-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (51 loc) · 1.46 KB
/
docker-compose.yml
File metadata and controls
54 lines (51 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Run tests locally with different Ruby versions.
# Set RAILS_VERSION to match the Rails version you want to test (same as CI matrix).
#
# Examples:
# RAILS_VERSION=6.1.7.8 docker compose run ruby33
# RAILS_VERSION=8.0.2 docker compose run ruby33
# RAILS_VERSION=5.2.8.1 docker compose run ruby27
#
# Build first: docker compose build
services:
ruby27:
build:
context: .
dockerfile: Dockerfile
args:
RUBY_VERSION: "2.7"
image: imageboss-rails-ruby27
volumes:
- .:/app
working_dir: /app
environment:
RAILS_VERSION: ${RAILS_VERSION:-6.1.7.8}
ruby33:
build:
context: .
dockerfile: Dockerfile
args:
RUBY_VERSION: "3.3"
image: imageboss-rails-ruby33
volumes:
- .:/app
working_dir: /app
environment:
RAILS_VERSION: ${RAILS_VERSION:-6.1.7.8}
# Release: build gem, tag, push to git and RubyGems. Use after bumping version and updating CHANGELOG.
# Requires GEM_HOST_API_KEY and git push access (e.g. mount SSH). See RELEASING.md.
release:
build:
context: .
dockerfile: Dockerfile
args:
RUBY_VERSION: "3.3"
image: imageboss-rails-ruby33
volumes:
- .:/app
# Mount SSH so git push works (optional if you use HTTPS with token)
- ${HOME}/.ssh:/root/.ssh:ro
working_dir: /app
environment:
GEM_HOST_API_KEY: ${GEM_HOST_API_KEY}
command: ["sh", "-c", "bundle install && bundle exec rake release"]