-
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
1 parent
7e79317
commit 8935327
Showing
4 changed files
with
76 additions
and
1 deletion.
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,26 @@ | ||
version: '3' | ||
services: | ||
web: | ||
build: | ||
context: ../ | ||
dockerfile: Dockerfile.demo | ||
args: | ||
- HEIMDALL_DB_HOST=db | ||
- HEIMDALL_DB_USERNAME=postgres | ||
- HEIMDALL_DB_PASSWORD=postgres | ||
ports: | ||
- "4000:4000" | ||
depends_on: | ||
- db | ||
environment: | ||
TERM: "xterm-256color" | ||
|
||
db: | ||
image: postgis/postgis:13-3.3-alpine | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
ports: | ||
- "5432:5432" | ||
volumes: | ||
- ../tmp/demo_postgresql:/var/lib/postgresql/data |
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 MIX_ENV="dev" | ||
|
||
FROM hexpm/elixir:1.14.4-erlang-26.0-alpine-3.17.3 as build | ||
|
||
# install build dependencies | ||
RUN apk add --no-cache build-base \ | ||
git \ | ||
python3 \ | ||
curl \ | ||
nodejs \ | ||
npm \ | ||
inotify-tools \ | ||
git | ||
|
||
# prepare build dir | ||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
# install hex + rebar | ||
RUN mix local.hex --force && \ | ||
mix local.rebar --force | ||
|
||
RUN mix deps.get | ||
|
||
ARG HEIMDALL_DB_HOST | ||
ARG HEIMDALL_DB_USERNAME | ||
ARG HEIMDALL_DB_PASSWORD | ||
ENV HEIMDALL_DB_HOST=${HEIMDALL_DB_HOST} | ||
ENV HEIMDALL_DB_USERNAME=${HEIMDALL_DB_USERNAME} | ||
ENV HEIMDALL_DB_PASSWORD=${HEIMDALL_DB_PASSWORD} | ||
|
||
RUN printenv | ||
|
||
CMD ["mix", "phx.server"] |
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