-
Notifications
You must be signed in to change notification settings - Fork 94
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
Geoffroy Empain
committed
Dec 8, 2020
1 parent
6120e47
commit 7e19fe5
Showing
9 changed files
with
80 additions
and
13 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 |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
!migrate-mongo-config.js | ||
!migrations | ||
!build | ||
**/*.js.map | ||
!docker/files |
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
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
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
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,6 @@ | ||
{ | ||
"admin": { | ||
"disabled": false, | ||
"listen": "0.0.0.0:2019" | ||
} | ||
} |
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,6 @@ | ||
#!/usr/bin/env sh | ||
set -e | ||
|
||
caddy start --config /etc/caddy/config.json | ||
|
||
exec "$@" |
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,3 @@ | ||
{ | ||
"MELI_API_URL": "http://localhost:3001" | ||
} |
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,35 @@ | ||
ARG UI_VERSION=latest | ||
|
||
# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact | ||
FROM getmeli/ui:${UI_VERSION} AS ui | ||
|
||
FROM caddy:2 | ||
|
||
# caddy | ||
COPY ./docker/files/entrypoint.sh /entrypoint.sh | ||
COPY ./docker/files/caddy-config.json /etc/caddy/config.json | ||
# ui | ||
COPY --from=ui /www /app/ui | ||
# api | ||
COPY ./build /app/api | ||
COPY ./node_modules /app/api/node_modules | ||
COPY ./migrate-mongo-config.js /app/api | ||
|
||
RUN chmod +x /entrypoint.sh \ | ||
&& apk add --no-cache \ | ||
bash \ | ||
nodejs \ | ||
&& mkdir -p /app/api/migrations | ||
|
||
WORKDIR /app | ||
|
||
LABEL maintainer="meli.sh" | ||
|
||
ENV MELI_URL_INTERNAL=http://localhost:3001 | ||
ENV MELI_UI_DIR=/app/ui | ||
|
||
EXPOSE 80 | ||
EXPOSE 443 | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD ["node", "api/index.js"] |
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