Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: revert how we initiate mongo database in docker-compose local dev #3541

Merged
merged 2 commits into from
Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,25 +107,18 @@ services:
network_mode: 'service:formsg' # reuse formsg service's network stack so that it can resolve localhost:5156 to mockpass:5156

database:
image: 'mongo:4.0'
image: 'mongo:4.2'
timotheeg marked this conversation as resolved.
Show resolved Hide resolved
container_name: 'formsg-db'
environment:
- MONGO_INITDB_DATABASE=formsg
volumes:
- mongodata:/data/db
command: --bind_ip_all --replSet rs0
- ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
ports:
- '27017:27017'
logging:
driver: none

mongo-seed:
build: ./mongo-seed
depends_on:
- database
links:
- database

localstack:
image: localstack/localstack:0.11.5
container_name: formsg-localstack
Expand Down
8 changes: 5 additions & 3 deletions mongo-seed/init.json → init-mongo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[{
/* eslint-disable */
db.createCollection("agencies")
db.agencies.insert([{
"shortName" : "govtech",
"fullName" : "Government Technology Agency",
"logo" : "https://s3-ap-southeast-1.amazonaws.com/agency-logo.form.sg/govtech.jpg",
Expand All @@ -7,5 +9,5 @@
"data.gov.sg",
"form.sg",
"open.gov.sg"
]
}]
],
}])
8 changes: 0 additions & 8 deletions mongo-seed/Dockerfile

This file was deleted.

8 changes: 0 additions & 8 deletions mongo-seed/init-mongo.sh

This file was deleted.

182 changes: 0 additions & 182 deletions mongo-seed/wait-for-it.sh

This file was deleted.