Docker hostname 변경

This commit is contained in:
JongYeob Sheen 2023-11-18 13:44:03 +09:00
parent 942f1efc40
commit e8ddadfd0a
6 changed files with 15 additions and 15 deletions

View File

@ -3,7 +3,7 @@ package config
const ( const (
BASE_URL = "https://learnsteam-quiz-api.jongyeob.com" BASE_URL = "https://learnsteam-quiz-api.jongyeob.com"
PORT = ":3030" PORT = ":3030"
DATABASE_URL = "root:fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6@tcp(db:3306)/learnsteam_quiz?charset=utf8&parseTime=True&loc=Local" DATABASE_URL = "root:fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6@tcp(learnsteam-quiz-db:3306)/learnsteam_quiz?charset=utf8&parseTime=True&loc=Local"
KAKAO_CLIENT_ID = "986830" KAKAO_CLIENT_ID = "986830"
KAKAO_CLIENT_SECRET = "14f63a8e91c4e0fe88bc40e3ff348233" KAKAO_CLIENT_SECRET = "14f63a8e91c4e0fe88bc40e3ff348233"

View File

@ -4,7 +4,7 @@ const (
BASE_URL = "http://localhost:3030" BASE_URL = "http://localhost:3030"
PORT = ":3030" PORT = ":3030"
//DATABASE_URL = "learnsteam:fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6@tcp(localhost:3306)/learnsteam_quiz?charset=utf8&parseTime=True&loc=Local" //DATABASE_URL = "learnsteam:fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6@tcp(localhost:3306)/learnsteam_quiz?charset=utf8&parseTime=True&loc=Local"
DATABASE_URL = "root:fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6@tcp(db:3306)/learnsteam_quiz?charset=utf8&parseTime=True&loc=Local" DATABASE_URL = "root:fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6@tcp(learnsteam-quiz-db:3306)/learnsteam_quiz?charset=utf8&parseTime=True&loc=Local"
KAKAO_CLIENT_ID = "986830" KAKAO_CLIENT_ID = "986830"
KAKAO_CLIENT_SECRET = "14f63a8e91c4e0fe88bc40e3ff348233" KAKAO_CLIENT_SECRET = "14f63a8e91c4e0fe88bc40e3ff348233"

View File

@ -3,7 +3,7 @@ package config
const ( const (
BASE_URL = "https://learnsteam-quiz-api.jongyeob.com" BASE_URL = "https://learnsteam-quiz-api.jongyeob.com"
PORT = ":3030" PORT = ":3030"
DATABASE_URL = "root:fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6@tcp(db:3306)/learnsteam_quiz?charset=utf8&parseTime=True&loc=Local" DATABASE_URL = "root:fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6@tcp(learnsteam-quiz-db:3306)/learnsteam_quiz?charset=utf8&parseTime=True&loc=Local"
KAKAO_CLIENT_ID = "986830" KAKAO_CLIENT_ID = "986830"
KAKAO_CLIENT_SECRET = "14f63a8e91c4e0fe88bc40e3ff348233" KAKAO_CLIENT_SECRET = "14f63a8e91c4e0fe88bc40e3ff348233"

View File

@ -1,7 +1,7 @@
version: "3" version: "3"
services: services:
db: learnsteam-quiz-db:
image: mysql:latest image: mysql:latest
environment: environment:
MYSQL_ROOT_PASSWORD: fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6 MYSQL_ROOT_PASSWORD: fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6
@ -10,7 +10,7 @@ services:
- "33061:3306" - "33061:3306"
volumes: volumes:
- db-learnsteam:/var/lib/mysql - db-learnsteam:/var/lib/mysql
app: learnsteam-quiz-api:
build: build:
context: ../../ context: ../../
dockerfile: docker/dev/Dockerfile dockerfile: docker/dev/Dockerfile
@ -18,13 +18,13 @@ services:
ports: ports:
- "3030:3030" - "3030:3030"
environment: environment:
DB_HOST: db DB_HOST: learnsteam-quiz-db
DB_PORT: 3306 DB_PORT: 3306
DB_USER: root DB_USER: root
DB_PASSWORD: fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6 DB_PASSWORD: fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6
DB_NAME: learnsteam_quiz DB_NAME: learnsteam_quiz
depends_on: depends_on:
- db - learnsteam-quiz-db
restart: always restart: always
volumes: volumes:
db-learnsteam: db-learnsteam:

View File

@ -1,7 +1,7 @@
version: "3" version: "3"
services: services:
db: learnsteam-quiz-db:
image: mysql:latest image: mysql:latest
environment: environment:
MYSQL_ROOT_PASSWORD: fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6 MYSQL_ROOT_PASSWORD: fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6
@ -10,7 +10,7 @@ services:
- "3306:3306" - "3306:3306"
volumes: volumes:
- db-learnsteam:/var/lib/mysql - db-learnsteam:/var/lib/mysql
app: learnsteam-quiz-api:
build: build:
context: ../../ context: ../../
dockerfile: docker/local/Dockerfile dockerfile: docker/local/Dockerfile
@ -18,9 +18,9 @@ services:
ports: ports:
- "3030:3030" - "3030:3030"
depends_on: depends_on:
- db - learnsteam-quiz-db
environment: environment:
DB_HOST: db DB_HOST: learnsteam-quiz-db
DB_PORT: 3306 DB_PORT: 3306
DB_USER: root DB_USER: root
DB_PASSWORD: fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6 DB_PASSWORD: fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6

View File

@ -1,7 +1,7 @@
version: "3" version: "3"
services: services:
db: learnsteam-quiz-db:
image: mysql:latest image: mysql:latest
environment: environment:
MYSQL_ROOT_PASSWORD: fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6 MYSQL_ROOT_PASSWORD: fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6
@ -10,7 +10,7 @@ services:
- "33061:3306" - "33061:3306"
volumes: volumes:
- db-learnsteam:/var/lib/mysql - db-learnsteam:/var/lib/mysql
app: learnsteam-quiz-api:
build: build:
context: ../../ context: ../../
dockerfile: docker/prod/Dockerfile dockerfile: docker/prod/Dockerfile
@ -18,13 +18,13 @@ services:
ports: ports:
- "3030:3030" - "3030:3030"
environment: environment:
DB_HOST: db DB_HOST: learnsteam-quiz-db
DB_PORT: 3306 DB_PORT: 3306
DB_USER: root DB_USER: root
DB_PASSWORD: fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6 DB_PASSWORD: fbOgZ6Xxn5VXBYihjqygRXyaK6ZUgKL6
DB_NAME: learnsteam_quiz DB_NAME: learnsteam_quiz
depends_on: depends_on:
- db - learnsteam-quiz-db
restart: always restart: always
volumes: volumes:
db-learnsteam: db-learnsteam: