Skip to content

Commit c03f20e

Browse files
ci: update docker compose and wait for db image (#1533)
* change docker-compose to docker compose and use eficode/wait-for instead of giorgos/takis * fix(ci): jwilder/dockerize instead of giorgos/takis * fix(ci): change hostname to wait for * test(ci): readd --link * fix(ci): revert yarn to main * test(ci): check postgres container name * test(ci): check mysql container port * fix(ci): use the whole port for postgres * test(ci): print docker ps * test(ci): check the logs of postgres container * test(ci): check if the container is still alive * test(ci): check why does the postgres shuts down * fix(ci): fix docker-compose formatting --------- Co-authored-by: Michael Shohat <[email protected]>
1 parent 2571924 commit c03f20e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
node-version: ${{ matrix.node-version }}
2727
- run: yarn install --frozen-lockfile --ignore-engines
2828
- run: yarn add sequelize@${{ matrix.sequelize-version }} --ignore-engines
29-
- run: docker-compose up -d ${DIALECT}
30-
- run: docker run --link ${DIALECT}:db -e CHECK_PORT=${SEQ_PORT::-1} -e CHECK_HOST=db --net cli_default giorgos/takis
29+
- run: docker compose up -d ${DIALECT}
30+
- run: docker run --link ${DIALECT}:db --net cli_default jwilder/dockerize -wait tcp://${DIALECT}:${SEQ_PORT::-1} -timeout 2m
3131
- run: yarn test
3232
test-mysql:
3333
strategy:
@@ -47,8 +47,8 @@ jobs:
4747
node-version: ${{ matrix.node-version }}
4848
- run: yarn install --frozen-lockfile --ignore-engines
4949
- run: yarn add sequelize@${{ matrix.sequelize-version }} --ignore-engines
50-
- run: docker-compose up -d ${DIALECT}
51-
- run: docker run --link ${DIALECT}:db -e CHECK_PORT=${SEQ_PORT::-1} -e CHECK_HOST=db --net cli_default giorgos/takis
50+
- run: docker compose up -d ${DIALECT}
51+
- run: docker run --link ${DIALECT}:db --net cli_default jwilder/dockerize -wait tcp://${DIALECT}:${SEQ_PORT::-1} -timeout 2m
5252
- run: yarn test
5353
test-sqlite:
5454
strategy:

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
- "54320:5432"
1313
container_name: postgres
1414
command: >
15-
bash -c "sed -i -e 's/# \(zh_TW\|en_US\).UTF-8 UTF-8/\1.UTF-8 UTF-8/' /etc/locale.gen
15+
bash -c "sed -i -e 's/# \\(zh_TW\\|en_US\\).UTF-8 UTF-8/\\1.UTF-8 UTF-8/' /etc/locale.gen
1616
&& locale-gen
1717
&& docker-entrypoint.sh postgres"
1818

0 commit comments

Comments
 (0)