-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
43 lines (41 loc) · 994 Bytes
/
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
version: '3'
services:
db:
image: mysql:latest
command: --default-authentication-plugin=mysql_native_password
restart: always
expose:
- '3306'
ports:
- "3306:3306"
# environment:
# MYSQL_ROOT_PASSWORD: P@ssw0rd
# MYSQL_DATABASE: ms_account_dev
volumes:
- D:/Project/Docker/MySQL:/var/lib/mysql
networks:
- testing-db-mysql
backend:
# build:
# context: .
# dockerfile: Dockerfile
image: go-gin:latest
depends_on:
- db
ports:
- 8081:8999
environment:
# pass env variable
# 1. export APP_DOCKER_ENVIRONMENT=PROD ==> docker-compose up -d
# 2. APP_DOCKER_ENVIRONMENT=PROD docker-compose up -d
# APP_ENVIRONMENT: ${APP_DOCKER_ENVIRONMENT}
APP_ENVIRONMENT: PROD
networks:
- testing-db-mysql
redis:
image: redis:latest
networks:
- testing-db-mysql
networks:
testing-db-mysql:
driver: "bridge"