File tree 3 files changed +13
-11
lines changed
3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,4 @@ FROM alpine:latest
9
9
WORKDIR /app
10
10
COPY --from=buildContainer /go/src/app/restapi .
11
11
12
- ENV DBUSER root
13
- ENV DBPASSWORD jobs@123
14
- ENV DBNAME api
15
- ENV DBHOST localhost
16
- ENV DBPORT 3306
17
-
18
- EXPOSE 8080
19
-
20
12
CMD ["./restapi" ]
File renamed without changes.
Original file line number Diff line number Diff line change 1
-
2
1
services :
3
2
db :
4
3
image : mysql:latest
5
- # container_name: app_mysql
6
4
ports :
7
5
- " 3306:3306"
8
6
volumes :
9
7
- /home/karan/go/src/github.com/karanrn/go-rest-api/mysql/:/var/lib/mysql
10
8
environment :
11
- MYSQL_ROOT_PASSWORD : ${root_password}
9
+ MYSQL_ROOT_PASSWORD : " ${ROOT_PASSWORD}"
10
+ app :
11
+ build : .
12
+ ports :
13
+ - " 8080:8080"
14
+ environment :
15
+ DBUSER : " ${DB_USER}"
16
+ DBPASSWORD : " ${DB_PASSWORD}"
17
+ DBNAME : api
18
+ DBHOST : db
19
+ DBPORT : 3306
20
+ depends_on :
21
+ - db
You can’t perform that action at this time.
0 commit comments