Skip to content

Commit

Permalink
fixed docker-compose.yml and rollback changes to postgres profile pro…
Browse files Browse the repository at this point in the history
…perties file
  • Loading branch information
cristinanegrean committed Jun 29, 2017
1 parent ee2adf0 commit 131628e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -65,7 +65,7 @@ $ git --version
```
$ git clone https://github.com/cristinanegrean/wanderlust-open-travel-api
$ cd wanderlust-open-travel-api
$ ./gradlew clean build buildDocker
$ docker-compose up
```

### Project contains a [test collection](https://github.com/cristinanegrean/wanderlust-open-travel-api/blob/master/Wanderlust_OpenTravelAPI_Postman_collection.json) which can be imported into [Postman](https://www.getpostman.com/) to navigate API links.
Expand Down
23 changes: 13 additions & 10 deletions docker-compose.yml
Expand Up @@ -2,14 +2,13 @@ version: '2'
services:
postgresdb:
container_name: wanderlust-datastore
image: postgres
ports:
- "5432:5432"
environment:
- POSTGRES_USER=cristinanegrean
- POSTGRES_PASSWORD=mysecretpassword
- POSTGRES_DB=wanderlust

image: postgres:9.6.3
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=demo
command: postgres
web:
container_name: open-travel-service
build: build/libs
Expand All @@ -19,8 +18,12 @@ services:
ports:
- "9000:9000"
links:
- postgres

- postgresdb
environment:
#SPRING_PROFILES_ACTIVE: postgres
SPRING_DATASOURCE_URL: jdbc:postgresql://postgresdb:5432/postgres
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: demo



2 changes: 1 addition & 1 deletion src/main/resources/application-postgres.properties
@@ -1,5 +1,5 @@
# Datasource configuration
spring.datasource.url=jdbc:postgresql://192.168.99.100:5432/wanderlust
spring.datasource.url=jdbc:postgresql://localhost:5432/wanderlust
spring.datasource.driverClassName=org.postgresql.Driver
spring.datasource.username=${POSTGRES_USER}
spring.datasource.password=${POSTGRES_PASSWORD}
Expand Down

0 comments on commit 131628e

Please sign in to comment.