-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from mozilla/feature/opschores
adding dockerfile and gha pipeline
- Loading branch information
Showing
3 changed files
with
52 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,15 @@ | ||
name: turkeyportal | ||
on: | ||
push: | ||
branches: | ||
paths-ignore: ["README.md"] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
turkeyGitops: | ||
uses: mozilla/hubs-ops/.github/workflows/turkeyGitops.yml@master | ||
with: | ||
registry: mozillareality | ||
dockerfile: Dockerfile | ||
secrets: | ||
DOCKER_HUB_PWD: ${{ secrets.DOCKER_HUB_PWD }} |
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 @@ | ||
# ---- build stage ---- | ||
FROM elixir:1.13 as builder | ||
RUN apt-get update -y && apt-get install -y build-essential git \ | ||
&& apt-get clean && rm -f /var/lib/apt/lists/*_* | ||
RUN mix local.rebar --force \ | ||
&& mix local.hex --force | ||
ENV MIX_ENV=prod | ||
COPY mix.exs mix.lock ./ | ||
RUN mix deps.get --only $MIX_ENV | ||
RUN mkdir config | ||
COPY config/config.exs config/${MIX_ENV}.exs config/ | ||
RUN mix deps.compile | ||
COPY priv priv | ||
COPY assets assets | ||
# RUN mix assets.deploy | ||
RUN mix phx.digest | ||
COPY lib ./lib | ||
RUN mix compile | ||
COPY config/runtime.exs config/ | ||
# COPY rel rel | ||
RUN mix release | ||
|
||
# ---- app stage ---- | ||
from debian:bullseye-slim | ||
RUN apt-get update -y && apt-get install -y libstdc++6 openssl libncurses5 locales \ | ||
&& apt-get clean && rm -f /var/lib/apt/lists/*_* | ||
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
WORKDIR "/app" | ||
RUN chown nobody /app | ||
COPY --from=builder --chown=nobody:root /_build/prod/rel/prtl ./ | ||
USER nobody | ||
CMD /app/bin/prtl start |
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