aboutsummaryrefslogtreecommitdiffstats
path: root/docker-compose-test.yaml
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2022-07-06 13:34:45 +0000
committerterminaldweller <thabogre@gmail.com>2022-07-06 13:34:45 +0000
commitda98e1dee68e421bdd7cfcf332c43a1f94a43a30 (patch)
tree792f70ee92e096d69d9989481a736ff3af0590c7 /docker-compose-test.yaml
parentwas using node image for self-signed certificates (diff)
parentfix for atom (diff)
downloadblog-da98e1dee68e421bdd7cfcf332c43a1f94a43a30.tar.gz
blog-da98e1dee68e421bdd7cfcf332c43a1f94a43a30.zip
Merge branch 'rss'
Diffstat (limited to '')
-rw-r--r--docker-compose-test.yaml41
1 files changed, 36 insertions, 5 deletions
diff --git a/docker-compose-test.yaml b/docker-compose-test.yaml
index 73981ef..fceb9b9 100644
--- a/docker-compose-test.yaml
+++ b/docker-compose-test.yaml
@@ -1,11 +1,12 @@
version: "3.7"
services:
- web:
- image: web
+ blog:
+ image: blog
build:
- context: ./
+ context: .
networks:
- - webnet
+ - blognet
+ - dbnet
ports:
- "19009:9000"
cap_drop:
@@ -13,5 +14,35 @@ services:
environment:
- SERVER_DEPLOYMENT_TYPE=test
- SERVER_LISTEN_PORT=9000
+ depends_on:
+ - mongo
+ secrets:
+ - mongo_user
+ - mongo_pass
+ mongo:
+ image: mongo:5.0
+ networks:
+ - dbnet
+ restart: on-failure
+ ports:
+ - "127.0.0.1:27117:27017"
+ - "127.0.0.1:27118:27018"
+ - "127.0.0.1:27119:27019"
+ volumes:
+ - blog-data:/data/db
+ environment:
+ - MONGO_INITDB_ROOT_USERNAME_FILE=/run/secrets/mongo_user
+ - MONGO_INITDB_ROOT_PASSWORD_FILE=/run/secrets/mongo_pass
+ secrets:
+ - mongo_user
+ - mongo_pass
networks:
- webnet:
+ blognet:
+ dbnet:
+volumes:
+ blog-data:
+secrets:
+ mongo_user:
+ file: ./mongo_secrets/mongo_user
+ mongo_pass:
+ file: ./mongo_secrets/mongo_pass