Skip to content

Commit

Permalink
add luarocks packages, use dnf, set WORKDIR in Dockerfile for easier …
Browse files Browse the repository at this point in the history
…'lapis migrate' command'
  • Loading branch information
mburns committed Jun 19, 2023
1 parent 80eab14 commit b57fe7d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
22 changes: 18 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,20 @@ ENV LAPIS_ENV="production"
VOLUME /var/data
VOLUME /var/www

# Install from Yum
RUN yum -y install \
# Install from DNF
RUN dnf -y install \
epel-release \
gcc \
git \
openresty-openssl-devel \
openssl-devel \
sqlite-devel \
; yum clean all
libmaxminddb \
dnf-plugins-core \
; dnf clean all

RUN yum config-manager --set-enabled powertools
# RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# RUN dnf config-manager --set-enabled powertools

# Install from LuaRocks
RUN luarocks install luasec
Expand All @@ -36,11 +40,21 @@ RUN luarocks install luacov
RUN luarocks install mailgun
RUN luarocks install markdown

RUN luarocks install luajit-geoip
RUN luarocks install lapis-bayes
RUN luarocks install lapis-console
RUN luarocks install lapis-exceptions
RUN luarocks install lapis_layout
RUN luarocks install lpeg
RUN luarocks install luasocket

# Entrypoint
ADD docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh

# Standard web port (use a reverse proxy for SSL)
EXPOSE 80

WORKDIR /var/www

ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
5 changes: 3 additions & 2 deletions fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
app = "pagesix"
primary_region = "sea"

[build]
image = "karai17/lapis-centos:latest"
[deploy]
release_command = "lapis migrate"
strategy = "immediate"

[http_service]
internal_port = 8080
Expand Down

0 comments on commit b57fe7d

Please sign in to comment.