Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ots
hypha
Commits
0790f45d
Commit
0790f45d
authored
2 years ago
by
Fredrik Jonsson
Browse files
Options
Downloads
Patches
Plain Diff
Move npm install command to entrypoint script.
parent
dedf317a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docker/Dockerfile.dev
+3
-10
3 additions, 10 deletions
docker/Dockerfile.dev
docker/entrypoint.dev.sh
+5
-2
5 additions, 2 deletions
docker/entrypoint.dev.sh
with
8 additions
and
12 deletions
docker/Dockerfile.dev
+
3
−
10
View file @
0790f45d
FROM cimg/python:3.9.10-node
# Set work directory
# Set work directory
.
WORKDIR /usr/local/hypha
# Set environment variables
# Set environment variables
.
ENV API_BASE_URL http://apply.hypha.test:8090/api
ENV DATABASE_URL postgres://hypha:hypha@db:5432/hypha
ENV DJANGO_SETTINGS_MODULE hypha.settings.dev
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Prepare for npm
COPY package.json package-lock.json /usr/local/hypha/
# Set owner on /usr/local.
RUN sudo chown -R circleci:circleci /usr/local
USER circleci
# Install node dependencies.
RUN npm install --global --quiet
# Install python dependencies.
COPY requirements.txt requirements-dev.txt /usr/local/hypha/
RUN pip3 install --quiet -r requirements-dev.txt
# Run entrypoint.sh
# Run entrypoint.sh
.
ENTRYPOINT ["/usr/local/hypha/docker/entrypoint.dev.sh"]
This diff is collapsed.
Click to expand it.
docker/entrypoint.dev.sh
+
5
−
2
View file @
0790f45d
#!/bin/sh
#npm install --quiet
# Install node packages and run build command.
npm
install
--quiet
npm run build
#
pip3 install --quiet -r requirements-dev.txt
#
Run needed python commands.
python3 manage.py createcachetable
python3 manage.py collectstatic
--noinput
--verbosity
=
0
python3 manage.py migrate
python3 manage.py wagtailsiteupdate hypha.test apply.hypha.test 8090
# Start gunicorn server.
gunicorn hypha.wsgi:application
--env
DJANGO_SETTINGS_MODULE
=
hypha.settings.dev
--reload
--bind
0.0.0.0:9001
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