-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the generated Docker setup to pull in the version of Crystal y…
…ou use, and allow for binding to 0.0.0.0 separately from local running apps. Fixes #786 Fixes #792 Fixes #789 Fixes #781 (#793)
- Loading branch information
Showing
4 changed files
with
31 additions
and
21 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
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
FROM crystallang/crystal:1.4.1 | ||
FROM crystallang/crystal:<%= Crystal::VERSION %> | ||
|
||
# Install utilities required to make this Dockerfile run | ||
RUN apt-get update && \ | ||
apt-get install -y wget | ||
|
||
<%- if browser? -%> | ||
# Add the nodesource ppa to apt. Update this to change the nodejs version. | ||
RUN wget https://deb.nodesource.com/setup_16.x -O- | bash | ||
|
||
|
@@ -20,21 +20,25 @@ RUN apt-get update && \ | |
# browser app. | ||
# - Mix is the default asset compiler. | ||
RUN npm install -g yarn mix | ||
<%- else -%> | ||
|
||
# Installs overmind, not needed if nox is the process manager. | ||
RUN wget https://github.com/DarthSim/overmind/releases/download/v2.2.2/overmind-v2.2.2-linux-amd64.gz && \ | ||
gunzip overmind-v2.2.2-linux-amd64.gz && \ | ||
mv overmind-v2.2.2-linux-amd64 /usr/bin/overmind && \ | ||
chmod +x /usr/bin/overmind | ||
# Apt installs: | ||
# - Postgres cli tools are required for lucky-cli. | ||
# - tmux is required for the Overmind process manager. | ||
RUN apt-get update && \ | ||
apt-get install -y postgresql-client tmux && \ | ||
rm -rf /var/lib/apt/lists/* | ||
<%- end -%> | ||
|
||
# Install lucky cli, TODO: fetch current lucky version from source code. | ||
# Install lucky cli | ||
WORKDIR /lucky/cli | ||
RUN git clone https://github.com/luckyframework/lucky_cli . && \ | ||
git checkout v1.0.0-rc1 && \ | ||
git checkout v<%= LuckyCli::VERSION %> && \ | ||
shards build --without-development && \ | ||
cp bin/lucky /usr/bin | ||
|
||
WORKDIR /app | ||
ENV DATABASE_URL=postgres://postgres:[email protected]:5432/postgres | ||
EXPOSE 5001 | ||
EXPOSE 3000 | ||
EXPOSE 3001 | ||
|