-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
60 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM node:18.19-alpine AS builder | ||
ENV NODE_ENV production | ||
|
||
RUN apk add --no-cache tzdata && \ | ||
echo 'Etc/UTC' > /etc/timezone | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY . . | ||
|
||
RUN yarn install | ||
|
||
RUN yarn build | ||
|
||
FROM node:18.19-alpine | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /usr/src/app/dist /app/dist | ||
COPY --from=builder /usr/src/app/.pnp.cjs /app/.pnp.cjs | ||
COPY --from=builder /usr/src/app/.yarnrc.yml /app/.yarnrc.yml | ||
COPY --from=builder /usr/src/app/.yarn /app/.yarn | ||
COPY --from=builder /usr/src/app/package.json /app/package.json | ||
COPY --from=builder /usr/src/app/yarn.lock /app/yarn.lock | ||
|
||
EXPOSE 3000 | ||
ENV NODE_ENV production | ||
CMD [ "yarn", "start:prod" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: '3' | ||
|
||
services: | ||
web: | ||
build: . | ||
restart: always | ||
ports: | ||
- '3002:3000' | ||
env_file: | ||
- ./src/env/production.env | ||
depends_on: | ||
- db | ||
db: | ||
image: mysql:8.0.3 | ||
platform: linux/x86_64 | ||
restart: always | ||
ports: | ||
- '3306:3306' | ||
environment: | ||
MYSQL_ROOT_PASSWORD: WFxKSZbug42Eaw4TFk | ||
MYSQL_DATABASE: logcon | ||
MYSQL_USER: logcon | ||
MYSQL_PASSWORD: 8V4WzkXXxtVhTYYyUJ | ||
TZ: Asia/Seoul | ||
volumes: | ||
- ./db/mysql/data:/var/lib/mysql | ||
- ./db/mysql/config:/etc/mysql/conf.d | ||
- ./db/mysql/init:/docker-entrypoint-initdb.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters