Skip to content

Commit 23a5d85

Browse files
committed
able to login via auth service in the container
1 parent a24c1ba commit 23a5d85

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RUN ls -alt; \
1111

1212
ENV DEBUG="*,-express*"
1313
ENV NODE_ENV=beta
14+
ENV NODE_OPTIONS="--dns-result-order=ipv4first"
1415

1516
EXPOSE 3183
1617

etc/local.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
[httpd]
22
enable_cors = true
3+
bind_address = 0.0.0.0
4+
5+
[chttpd]
6+
bind_address = ::
37

48
[cors]
59
origins = *

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
},
6363
"scripts": {
6464
"docker:build": "docker build -t fielddb-auth .",
65-
"docker:test": "echo 'module.exports = { usersDbConnection: { url: \"http://localhost:5984\" } };' > config/local.js && docker compose up -d && sleep 3 && docker compose logs && npm run setup && npm run test:deprecated",
66-
"docker:test:no-cache": "echo 'module.exports = { usersDbConnection: { url: \"http://localhost:5984\" } };' > config/local.js && docker compose build --no-cache && docker compose up -d && sleep 15 && docker compose logs && npm run setup && npm run test:deprecated",
65+
"test:integration": "echo 'module.exports = { usersDbConnection: { url: \"http://localhost:5984\" } };' > config/local.js && docker compose up -d && sleep 3 && docker compose logs && npm run setup && URL=https://localhost:3183 npm run test:deprecated",
66+
"docker:test:no-cache": "echo 'module.exports = { usersDbConnection: { url: \"http://couchdb:5984\" } };' > config/local.js && docker compose build --no-cache && docker compose up -d && sleep 15 && docker compose logs && npm run setup && URL=https://localhost:3183 npm run test:deprecated",
6767
"coverage": "NODE_ENV=test BUNYAN_LOG_LEVEL=FATAL nyc npm test",
6868
"lint": "eslint ",
6969
"lint:ci": "eslint .",

test/routes/deprecated-spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('/ deprecated', () => {
2424
// eslint-disable-next-line no-underscore-dangle
2525
debug('before replay localhosts', replay._localhosts);
2626

27-
return supertest(config.usersDbConnection.url)
27+
return supertest(config.usersDbConnection.url.replace('://couchdb', '://localhost'))
2828
.get('/')
2929
.set('Accept', 'application/json')
3030
.then((res) => {

0 commit comments

Comments
 (0)