forked from mupparajuvamsi/awsprojectdemo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (39 loc) · 1.07 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
version: '3.1'
services:
mysqlservice:
image: mysql/mysql-server
container_name: mysqltest
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: "test"
MYSQL_USER: "test"
MYSQL_PASSWORD: "test"
MYSQL_ROOT_PASSWORD: "root"
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
postgresservice:
image: postgres
container_name: postgrestest
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: example
version: '3.1'
services:
postgresservice:
image: postgres
container_name: spring-boot-postgres
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: dbpassword
POSTGRES_DB: docker
springbootapp:
image: wonwoo/spring-boot-docker-postgresql
container_name: springbootapptest
ports:
- "8080:8080"
depends_on:
- postgresservice
docker run --name spring-boot-postgres -e POSTGRES_PASSWORD=dbpassword -e POSTGRES_DB=docker -d postgres
docker run --name spring-boot-docker-postgresql --link spring-boot-postgres:postgres -p 8080:8080 -d wonwoo/spring-boot-docker-postgresql