Skip to content

Commit 2c3c02d

Browse files
authored
Merge pull request #30 from MZC-CSC/develop
update docker and docker compose for updated structure
2 parents 7c968a4 + 81f12d6 commit 2c3c02d

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

Diff for: api/Dockerfile.local

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Stage 1 - Go Build Env
2-
FROM golang:1.22.3-alpine AS build
2+
FROM golang:1.23-alpine AS build
33

44
RUN apk add --no-cache gcc libc-dev musl-dev curl npm wget
55

@@ -15,22 +15,22 @@ ENV CGO_ENABLED=1
1515

1616
RUN mkdir -p /src/mc-web-console-api
1717
WORKDIR /src/mc-web-console-api
18-
ADD . .
18+
ADD ./api .
19+
ADD ./conf ./conf
1920

2021
RUN go mod download
2122
RUN buffalo build --static -o /bin/api
2223

2324
## Stage 2 - Application Deploy
2425
FROM debian:buster-slim as deploy
2526

26-
WORKDIR /app/
2727
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
2929

3030
ENV API_ADDR 0.0.0.0
3131
ENV API_PORT 3000
3232

3333
ENV MCIAM_USE=true
3434

3535
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'

Diff for: scripts/docker-compose-vue.yaml

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
version: '3.9'
2-
31
services:
42
mc-web-console-api:
53
build:
6-
context: ../mc_web_console_api
7-
dockerfile: Dockerfile.local
4+
context: ..
5+
dockerfile: api/Dockerfile.local
86
container_name: mc-web-console-api
97
depends_on:
108
- mc-web-console-postgres
@@ -22,7 +20,7 @@ services:
2220

2321
mc-web-console-front:
2422
build:
25-
context: ../mc_web_console_new_front
23+
context: ../front
2624
dockerfile: Dockerfile
2725
container_name: mc-web-console-front
2826
depends_on:

0 commit comments

Comments
 (0)