Skip to content

Commit 336e5e7

Browse files
committed
chore: first
1 parent 9d80521 commit 336e5e7

3 files changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
ci:
9+
env:
10+
IMAGE_NAME: "hex_tiny"
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- pair:
16+
elixir: '1.18.3-otp-27'
17+
otp: '27.3.1'
18+
19+
runs-on: ubuntu-24.04
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Build Docker Image
25+
run: docker build -t $IMAGE_NAME:latest docker/Dockerfile
26+

docker/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM elixir:1.18-alpine
2+
ADD entrypoint.sh /
3+
RUN apk update && apk add openssl
4+
RUN mkdir /acme
5+
RUN cd /acme && openssl genrsa -out private_key.pem
6+
RUN cd /acme && mkdir public && mix local.hex --force && mix hex.registry build public --name=acme --private-key=private_key.pem
7+
RUN cd /acme && mix hex.package fetch decimal 2.0.0 && mv /acme/decimal-2.0.0.tar /acme/public/tarballs/ && mix hex.registry build public --name=acme --private-key=private_key.pem
8+
9+
ENTRYPOINT ["/entrypoint.sh"]

docker/entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
cd /acme
3+
erl -s inets -eval 'inets:start(httpd,[{port,8000},{server_name,"localhost"},{server_root,"."},{document_root,"public"}]).'

0 commit comments

Comments
 (0)