윤준석

Merge branch '220514_joongna_deploy_setting' into 'main'

220514 joongna deploy setting



See merge request !7
1 FROM golang:1.17.3 1 FROM golang:1.17.3
2 2
3 +ENV Xvfb :99
4 +ENV DISPLAY=:99
5 +ENV GO111MODULE=on
6 +
3 RUN apt-get -y update 7 RUN apt-get -y update
4 RUN apt-get install -y wget xvfb gnupg 8 RUN apt-get install -y wget xvfb gnupg
5 9
...@@ -12,5 +16,10 @@ RUN apt-get install -yqq unzip ...@@ -12,5 +16,10 @@ RUN apt-get install -yqq unzip
12 RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip 16 RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip
13 RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/ 17 RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/
14 18
15 -ENV Xvfb :99 19 +WORKDIR /src
16 -ENV DISPLAY=:99 20 +COPY . /src
21 +
22 +RUN go build -o Joongna_api_server
23 +
24 +EXPOSE 8080
25 +CMD ["./Joongna_api_server"]
...\ No newline at end of file ...\ No newline at end of file
......
1 +#!/usr/bin/env bash
2 +
3 +docker build -t joongna-api-server .
4 +docker-compose up -d
...\ No newline at end of file ...\ No newline at end of file
1 +version: '3'
2 +
3 +services:
4 + joongna_api:
5 + image: joongna-api-server
6 + restart: always
7 + container_name: joongna-api-server-container
8 + ports:
9 + - '18081:8080'
...\ No newline at end of file ...\ No newline at end of file
1 +#!/usr/bin/env bash
2 +
3 +docker-compose down
4 +docker image rm joongna-api-server
...\ No newline at end of file ...\ No newline at end of file