-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from camptocamp/non_root
Fix profiling to run as non-root
- Loading branch information
Showing
9 changed files
with
26 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,10 +7,11 @@ LABEL maintainer "[email protected]" | |
# Step #1 copy only the stuff needed to install the dependencies and run the script | ||
WORKDIR /app | ||
|
||
EXPOSE 80 | ||
EXPOSE 8080 | ||
|
||
ENV SQLALCHEMY_URL=postgresql://www-data:www-data@db:5432/test \ | ||
SQLALCHEMY_URL_SLAVE=postgresql://www-data:www-data@db_slave:5432/test | ||
SQLALCHEMY_URL_SLAVE=postgresql://www-data:www-data@db_slave:5432/test \ | ||
GUNICORN_PARAMS="-b :8080 --worker-class gthread --threads 10 --workers 5" | ||
|
||
# Step #2 copy the rest of the files (watch for the .dockerignore) | ||
COPY . /app | ||
|
@@ -23,3 +24,6 @@ RUN pip install --no-cache-dir -r requirements.txt -e . && \ | |
c2cwsgiutils_genversion.py $GIT_HASH && \ | ||
flake8 c2cwsgiutils_app app_alembic && \ | ||
python -m compileall -q . | ||
|
||
# www-data | ||
USER 33 |
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 |
---|---|---|
|
@@ -18,15 +18,15 @@ app: | |
SENTRY_URL: https://14bdb65de3f247c4a89cc7ed53ddec72:[email protected]/5 | ||
C2C_REDIS_URL: redis://redis:6379 | ||
PYTHONMALLOC: debug | ||
GUNICORN_PARAMS: -b :80 --worker-class gthread --threads 10 --workers 1 | ||
GUNICORN_PARAMS: -b :8080 --worker-class gthread --threads 10 --workers 1 | ||
C2C_PROFILER_PATH: /api_profiler | ||
C2C_PROFILER_MODULES: "c2cwsgiutils c2cwsgiutils_app sqlalchemy request" | ||
links: | ||
- db | ||
- db_slave | ||
- redis | ||
ports: | ||
- 8480:80 | ||
- 8480:8080 | ||
|
||
alembic_master: | ||
image: camptocamp/c2cwsgiutils_test_app:latest | ||
|
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