Skip to content

Commit 83afd4a

Browse files
author
Florin Mateescu
committed
fix docker-compose building mongo database
1 parent 8ac0e3a commit 83afd4a

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

apps/express/.env.local.example

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ payload_users_slug=users
1212
mongo_password=
1313
mongo_username=
1414
mongo_db=
15-
mongo_connectionString=mongodb://localhost:27017 # mongodb://<app_name>-mongodb:27017 # app name is defined above.
15+
mongo_connectionString=mongodb://localhost:<mongo_port> # mongodb://<app_name>-mongodb:27017 # app name is defined above.
1616
email_host= # optional. You can configure the way you want the nodemailer and add the necessary config here.
1717
email_user=
1818
email_from=
19-
email_password=
19+
email_password=
20+
mongo_port=

docker-compose.yml renamed to apps/express/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
volumes:
1313
- .mongodata:/data/db
1414
env_file:
15-
- .env
15+
- .env.local
1616
networks:
1717
- webnet
1818
ports:

apps/express/project.json

+4
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@
110110
"cwd": "apps/express"
111111
}
112112
},
113+
"mongo": {
114+
"command": "docker-compose -f apps/express/docker-compose.yml up",
115+
"cwd": "apps/express"
116+
},
113117
"docker-build": {
114118
"dependsOn": ["build"],
115119
"command": "docker build -f apps/express/Dockerfile . -t express"

0 commit comments

Comments
 (0)