Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
Habit Tracker Web App
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Group 10
Habit Tracker Web App
Commits
c3f97a77
Commit
c3f97a77
authored
4 years ago
by
Rysev, Gleb (UG - SISC)
Browse files
Options
Downloads
Patches
Plain Diff
More docker
parent
d828df4e
No related branches found
Branches containing commit
No related tags found
Loading
Pipeline
#30484
failed
4 years ago
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.env.docker
+3
-0
3 additions, 0 deletions
.env.docker
Dockerfile
+8
-5
8 additions, 5 deletions
Dockerfile
docker-compose.yml
+10
-9
10 additions, 9 deletions
docker-compose.yml
entrypoint.sh
+8
-0
8 additions, 0 deletions
entrypoint.sh
with
29 additions
and
14 deletions
.env.docker
0 → 100644
+
3
−
0
View file @
c3f97a77
NODE_ENV=development
RAILS_ENV=development
WEBPACKER_DEV_SERVER_HOST=0.0.0.0
This diff is collapsed.
Click to expand it.
Dockerfile
+
8
−
5
View file @
c3f97a77
...
@@ -6,18 +6,21 @@ FROM ruby:2.5.7
...
@@ -6,18 +6,21 @@ FROM ruby:2.5.7
RUN
mkdir
-p
/usr/src/app
RUN
mkdir
-p
/usr/src/app
WORKDIR
/usr/src/app
WORKDIR
/usr/src/app
EXPOSE
3000
CMD
["rails", "server", "-b", "0.0.0.0"]
RUN
apt-get update
&&
apt-get
install
-y
nodejs
--no-install-recommends
&&
rm
-rf
/var/lib/apt/lists/
*
RUN
apt-get update
&&
apt-get
install
-y
nodejs
--no-install-recommends
&&
rm
-rf
/var/lib/apt/lists/
*
RUN
apt-get update
&&
apt-get
install
-y
default-mysql-client postgresql-client sqlite3
--no-install-recommends
&&
rm
-rf
/var/lib/apt/lists/
*
RUN
apt-get update
&&
apt-get
install
-y
default-mysql-client postgresql-client sqlite3
yarn
--no-install-recommends
&&
rm
-rf
/var/lib/apt/lists/
*
#RUN gem install bundler -v 1.17.3
#RUN gem install bundler -v 1.17.3
COPY
Gemfile /usr/src/app/
COPY
Gemfile /usr/src/app/
# Uncomment the line below if Gemfile.lock is maintained outside of build process
# Uncomment the line below if Gemfile.lock is maintained outside of build process
COPY
Gemfile.lock /usr/src/app/
COPY
Gemfile.lock /usr/src/app/
RUN
bundle
install
RUN
bundle
install
COPY
. /usr/src/app
COPY
. /usr/src/app
# COPY entrypoint.sh /usr/bin/
# RUN chmod +x /usr/bin/entrypoint.sh
# ENTRYPOINT ["entrypoint.sh"]
EXPOSE
3000
CMD
["rails", "server", "-b", "0.0.0.0"]
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
10
−
9
View file @
c3f97a77
version
:
"
3"
version
:
'
3'
services
:
services
:
db
:
webpacker
:
image
:
postgres
build
:
.
env_file
:
-
'
.env.docker'
command
:
./bin/webpack-dev-server
volumes
:
volumes
:
-
.
/tmp/db:/var/lib/postgresql/data
-
.
:/app
environment
:
ports
:
POSTGRES_PASSWORD
:
password
-
'
3035:3035'
web
:
web
:
build
:
.
build
:
.
command
:
bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
command
:
bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes
:
volumes
:
-
.:/
my
app
-
.:/app
ports
:
ports
:
-
"
3000:3000"
-
"
3000:3000"
depends_on
:
-
db
This diff is collapsed.
Click to expand it.
entrypoint.sh
0 → 100644
+
8
−
0
View file @
c3f97a77
#!/bin/sh
set
-e
# Remove a potentially pre-existing server.pid for Rails.
rm
-f
/myapp/tmp/pids/server.pid
# Then exec the container's main process (what's set as CMD in the Dockerfile).
exec
"
$@
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment