Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 18 deletions.
27 changes: 18 additions & 9 deletions apps/agric-hub-tests/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,38 @@ version: "3"
services:
db:
image: mongo
command: --default-authentication-plugin=mysql_native_password
restart: always
ports:
- ${DB_PORT}:27017
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MONGO_INITDB_ROOT_USERNAME: ${DB_USER}
MONGO_INITDB_ROOT_PASSWORD: ${DB_PASSWORD}
MONGO_INITDB_DATABASE: ${DB_NAME}
MONGO_REPLICA_SET_NAME: rs0
restart: always
entrypoint:
- /bin/bash
- -c
- openssl rand -base64 741 > /data/cert.crt; chmod 400 /data/cert.crt &&
chown 999 /data/cert.crt; /usr/local/bin/docker-entrypoint.sh mongod
--bind_ip_all --keyFile /data/cert.crt --replSet rs0
healthcheck:
test: "test $$(mongosh --quiet -u $${MONGO_INITDB_ROOT_USERNAME} -p
$${MONGO_INITDB_ROOT_PASSWORD} --eval \"try { rs.initiate({ _id:
'\"rs0\"',members: [{ _id: 0, host: '\"localhost\"' }] }).ok } catch (_)
{ rs.status().ok}\") -eq 1"
start_period: 5s
interval: 10s
timeout: 10s
interval: 10s
retries: 10
start_period: 5s
entrypoint:
- /bin/bash
- -c
- openssl rand -base64 741 > /data/cert.crt; chmod 400 /data/cert.crt &&
chown 999 /data/cert.crt; /usr/local/bin/docker-entrypoint.sh mongod
--bind_ip_all --keyFile /data/cert.crt --replSet rs0
volumes:
- mongo:/var/lib/mongosql/data
adminer:
image: adminer
restart: always
ports:
- 1234:8080
volumes:
mysql: ~
mongo: ~
27 changes: 18 additions & 9 deletions apps/agric-hub-tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,40 @@ services:
depends_on:
db:
condition: service_healthy
adminer:
image: adminer
restart: always
ports:
- 1234:8080
db:
image: mongo
command: --default-authentication-plugin=mysql_native_password
restart: always
ports:
- ${DB_PORT}:27017
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MONGO_INITDB_ROOT_USERNAME: ${DB_USER}
MONGO_INITDB_ROOT_PASSWORD: ${DB_PASSWORD}
MONGO_INITDB_DATABASE: ${DB_NAME}
MONGO_REPLICA_SET_NAME: rs0
restart: always
entrypoint:
- /bin/bash
- -c
- openssl rand -base64 741 > /data/cert.crt; chmod 400 /data/cert.crt &&
chown 999 /data/cert.crt; /usr/local/bin/docker-entrypoint.sh mongod
--bind_ip_all --keyFile /data/cert.crt --replSet rs0
healthcheck:
test: "test $$(mongosh --quiet -u $${MONGO_INITDB_ROOT_USERNAME} -p
$${MONGO_INITDB_ROOT_PASSWORD} --eval \"try { rs.initiate({ _id:
'rs0',members: [{ _id: 0, host: 'db' }] }).ok } catch (_) {
rs.status().ok}\") -eq 1"
start_period: 5s
interval: 10s
timeout: 10s
interval: 10s
retries: 10
start_period: 5s
entrypoint:
- /bin/bash
- -c
- openssl rand -base64 741 > /data/cert.crt; chmod 400 /data/cert.crt &&
chown 999 /data/cert.crt; /usr/local/bin/docker-entrypoint.sh mongod
--bind_ip_all --keyFile /data/cert.crt --replSet rs0
volumes:
- mongo:/var/lib/mongosql/data
volumes:
mysql: ~
mongo: ~

0 comments on commit 087cf87

Please sign in to comment.