Skip to content

Instantly share code, notes, and snippets.

@konung
Forked from robacarp/lucky_crystal.dockerfile
Created February 15, 2019 05:33
Show Gist options
  • Save konung/afe15b1a7dd7ec95be028cbe5f90d141 to your computer and use it in GitHub Desktop.
Save konung/afe15b1a7dd7ec95be028cbe5f90d141 to your computer and use it in GitHub Desktop.
FROM crystallang/crystal:0.27.2
WORKDIR /opt/src
# Install nodejs
COPY bin ./bin
RUN bin/nodesource_11.x
RUN apt-get update && apt-get install -y nodejs
# npm install
COPY package-lock.json package.json ./
RUN npm install
COPY shard.lock shard.yml ./
RUN ls -la
RUN shards install
COPY config config/
COPY db db/
COPY public public/
COPY src src/
COPY tasks tasks/
COPY Procfile tasks.cr webpack.mix.js ./
EXPOSE 3001
EXPOSE 3002
EXPOSE 5000
ENV LUCKY_ENV development
ENV DATABASE_URL postgres://docker.for.mac.localhost/database
ENTRYPOINT ["/bin/bash"]
CMD ["-c", "crystal run src/server.cr"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment