Skip to content

Commit bcc8de3

Browse files
authored
Merge pull request #37 from blocknotes/docs/update-extra-contents
docs: update extra contents
2 parents 8065fbf + 1f52c75 commit bcc8de3

5 files changed

Lines changed: 21 additions & 51 deletions

File tree

extra/Dockerfile_27

Lines changed: 0 additions & 15 deletions
This file was deleted.

extra/Dockerfile_30

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
FROM ruby:3.0-alpine
1+
FROM ruby:3.0-slim
22

33
ARG DB_TEST
44

5-
RUN apk add --no-cache --update build-base dpkg gcompat mysql-dev postgresql-dev tzdata
5+
RUN apt-get update
6+
RUN apt-get install --no-install-recommends -y build-essential curl file git nano netcat libmariadb-dev libpq-dev openssl tzdata
67

78
# App setup
89
WORKDIR /usr/src/app
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM ruby:2.6-alpine
1+
FROM ruby:3.2-slim
22

33
ARG DB_TEST
44

5-
RUN apk add --no-cache --update build-base dpkg gcompat mysql-dev postgresql-dev tzdata
6-
RUN gem install bundler
5+
RUN apt-get update
6+
RUN apt-get install --no-install-recommends -y build-essential curl file git nano netcat-traditional libmariadb-dev libpq-dev openssl tzdata
77

88
# App setup
99
WORKDIR /usr/src/app

extra/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ DB_TEST=postgres RAILS=7.0 bin/appraisal rails-7_0-postgres rails db:drop db:cre
3131

3232
```sh
3333
# Run a specific test configuration
34-
docker-compose up --abort-on-container-exit -- tests_26_mysql
35-
docker-compose up --abort-on-container-exit -- tests_26_pg
36-
docker-compose up --abort-on-container-exit -- tests_27_mysql
37-
docker-compose up --abort-on-container-exit -- tests_27_pg
34+
docker compose up --abort-on-container-exit -- tests_30_mysql
35+
docker compose up --abort-on-container-exit -- tests_30_postgres
3836
# Cleanup (also removing local images):
39-
docker-compose down --rmi local
37+
docker compose down --rmi local
4038
```

extra/docker-compose.yml

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ x-defaults:
1111
MYSQL_DB_NAME: test_db
1212
MYSQL_DB_USERNAME: root
1313
MYSQL_DB_PASSWORD: password
14+
RAILS: '7.0'
1415
RAILS_ENV: test
1516
command:
1617
- sh
@@ -19,7 +20,7 @@ x-defaults:
1920
while ! nc -z $${DB_TEST} $${DB_PORT} </dev/null
2021
do echo "Waiting for DB ($${DB_TEST})..." && sleep 5; done
2122
echo "DB is now available!"
22-
cd spec/dummy
23+
cd spec/dummy70
2324
bin/setup
2425
cd ../..
2526
bin/rspec
@@ -37,6 +38,7 @@ x-defaults:
3738
PG_DB_NAME: test_db
3839
PG_DB_USERNAME: postgres
3940
PG_DB_PASSWORD: password
41+
RAILS: '7.0'
4042
RAILS_ENV: test
4143
command:
4244
- sh
@@ -45,7 +47,7 @@ x-defaults:
4547
while ! nc -z $${DB_TEST} $${DB_PORT} </dev/null
4648
do echo "Waiting for DB ($${DB_TEST})..." && sleep 5; done
4749
echo "DB is now available!"
48-
cd spec/dummy
50+
cd spec/dummy70
4951
bin/setup
5052
cd ../..
5153
bin/rspec
@@ -66,50 +68,34 @@ services:
6668
environment:
6769
MYSQL_ROOT_PASSWORD: password
6870

69-
tests_26_mysql:
70-
<<: *tests_mysql
71-
build:
72-
context: ..
73-
dockerfile: extra/Dockerfile_26
74-
args:
75-
DB_TEST: mysql
76-
77-
tests_26_postgres:
78-
<<: *tests_postgres
79-
build:
80-
context: ..
81-
dockerfile: extra/Dockerfile_26
82-
args:
83-
DB_TEST: postgres
84-
85-
tests_27_mysql:
71+
tests_30_mysql:
8672
<<: *tests_mysql
8773
build:
8874
context: ..
89-
dockerfile: extra/Dockerfile_27
75+
dockerfile: extra/Dockerfile_30
9076
args:
9177
DB_TEST: mysql
9278

93-
tests_27_postgres:
79+
tests_30_postgres:
9480
<<: *tests_postgres
9581
build:
9682
context: ..
97-
dockerfile: extra/Dockerfile_27
83+
dockerfile: extra/Dockerfile_30
9884
args:
9985
DB_TEST: postgres
10086

101-
tests_30_mysql:
87+
tests_32_mysql:
10288
<<: *tests_mysql
10389
build:
10490
context: ..
105-
dockerfile: extra/Dockerfile_30
91+
dockerfile: extra/Dockerfile_32
10692
args:
10793
DB_TEST: mysql
10894

109-
tests_30_postgres:
95+
tests_32_postgres:
11096
<<: *tests_postgres
11197
build:
11298
context: ..
113-
dockerfile: extra/Dockerfile_30
99+
dockerfile: extra/Dockerfile_32
114100
args:
115101
DB_TEST: postgres

0 commit comments

Comments
 (0)