Commit 2d1a5c04 authored by David PETIT's avatar David PETIT
Browse files

ready to deploy

parent de0f3ece
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
version: '3'
services:
api:
container_name: api1.0
restart: always
build: .
ports:
......@@ -9,11 +8,6 @@ services:
depends_on:
- mongo
mongo:
container_name: mongo
image: mongo
ports:
- '27017:27017'
volumes:
- './mongodbdata:/data/db'
#sudo docker-compose up
\ No newline at end of file
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -32,7 +32,7 @@ func main() {
// define the mongo client
// without docker you must be use this url --> mongodb://127.0.0.1:27017
// with docker you must be use this url --> mongodb://mongo:27017/
clientOptions := options.Client().ApplyURI("mongodb://mongodb:27017/")
clientOptions := options.Client().ApplyURI("mongodb://mongo:27017/")
client, errMongo := mongo.Connect(ctx, clientOptions)
// errMongo
if errMongo != nil {
......@@ -95,4 +95,4 @@ func main() {
if err := http.ListenAndServe(":"+port, router); err != nil {
log.Fatal(err)
}
}
\ No newline at end of file
}
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment