File tree 2 files changed +8
-10
lines changed
2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 1
1
## Stage 1 - Go Build Env
2
- FROM golang:1.22.3 -alpine AS build
2
+ FROM golang:1.23 -alpine AS build
3
3
4
4
RUN apk add --no-cache gcc libc-dev musl-dev curl npm wget
5
5
@@ -15,22 +15,22 @@ ENV CGO_ENABLED=1
15
15
16
16
RUN mkdir -p /src/mc-web-console-api
17
17
WORKDIR /src/mc-web-console-api
18
- ADD . .
18
+ ADD ./api .
19
+ ADD ./conf ./conf
19
20
20
21
RUN go mod download
21
22
RUN buffalo build --static -o /bin/api
22
23
23
24
## Stage 2 - Application Deploy
24
25
FROM debian:buster-slim as deploy
25
26
26
- WORKDIR /app/
27
27
COPY --from=build /bin/api .
28
- COPY --from=build /src/mc-web-console-api/conf /app/ conf
28
+ COPY --from=build /src/mc-web-console-api/conf /conf
29
29
30
30
ENV API_ADDR 0.0.0.0
31
31
ENV API_PORT 3000
32
32
33
33
ENV MCIAM_USE=true
34
34
35
35
EXPOSE 3000
36
- CMD bash -c 'until /app/ api migrate; do echo "Migration failed. Retrying in 10 seconds..."; sleep 10; done; /app/ api > /app/ api.log 2>&1 & tail -f /app /api.log & wait'
36
+ CMD bash -c 'until /api migrate; do echo "Migration failed. Retrying in 10 seconds..."; sleep 10; done; /api > /api.log 2>&1 & tail -f /api.log & wait'
Original file line number Diff line number Diff line change 1
- version : ' 3.9'
2
-
3
1
services :
4
2
mc-web-console-api :
5
3
build :
6
- context : ../mc_web_console_api
7
- dockerfile : Dockerfile.local
4
+ context : ..
5
+ dockerfile : api/ Dockerfile.local
8
6
container_name : mc-web-console-api
9
7
depends_on :
10
8
- mc-web-console-postgres
@@ -22,7 +20,7 @@ services:
22
20
23
21
mc-web-console-front :
24
22
build :
25
- context : ../mc_web_console_new_front
23
+ context : ../front
26
24
dockerfile : Dockerfile
27
25
container_name : mc-web-console-front
28
26
depends_on :
You can’t perform that action at this time.
0 commit comments