forked from SerpicoProject/Serpico
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docker): Added basic development image for docker.
- Loading branch information
Showing
4 changed files
with
44 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '3' | ||
services: | ||
serpico: | ||
environment: | ||
- SRP_ADMIN=administrator | ||
- SRP_FINDINGS=yes | ||
build: | ||
dockerfile: docker/dev.dockerfile | ||
context: . | ||
ports: | ||
- "8443:8443" | ||
volumes: | ||
- ./:/Serpico |
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,9 @@ | ||
FROM ruby:2.3.5 | ||
MAINTAINER Serpico | ||
ENV SRP_ROOT /Serpico | ||
WORKDIR $SRP_ROOT | ||
# No volume: It will be mounted by docker-compose. | ||
COPY Gemfile $SRP_ROOT/ | ||
RUN bundle install | ||
EXPOSE 8443 | ||
CMD ["bash", "docker/docker.sh"] |
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,12 @@ | ||
#!/usr/bin/bash | ||
# This script is used as the entry point for the docker image. | ||
# It will initialize the database if it isn't already present. | ||
|
||
if [ ! -f "$SRP_ROOT/db/master.db" ]; then | ||
echo "First run detected. Initializing database..." | ||
ruby "$SRP_ROOT/scripts/first_time.rb" | ||
fi | ||
|
||
# CMD ["ruby", "serpico.rb"] | ||
ruby serpico.rb | ||
|
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