Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
shadowban-eu-backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
shadowban-eu-backend
Commits
4d04569f
Commit
4d04569f
authored
Dec 15, 2020
by
Raphael Beer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: some docker specifics
parent
f8897cec
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
8 deletions
+16
-8
Dockerfile
Dockerfile
+4
-0
bin/_venv
bin/_venv
+10
-6
bin/docker-entry.sh
bin/docker-entry.sh
+1
-1
bin/install.sh
bin/install.sh
+1
-1
No files found.
Dockerfile
View file @
4d04569f
FROM
python:3.7-slim-buster
RUN
apt update
RUN
apt
install
gcc python3-dev
-y
RUN
mkdir
/app
ADD
. /app
ENV
NO_VENV=1
WORKDIR
/app
RUN
./bin/install.sh
bin/_venv
View file @
4d04569f
...
...
@@ -6,10 +6,14 @@ if ! hash python3 &> /dev/null; then
fi
echo "OK"
if [ ! -f .venv/bin/activate ]; then
echo "Creating new venv in: ./.venv"
python3 -m venv ./.venv
fi
if [ "$NO_VENV" != "1" ]; then
if [ ! -f .venv/bin/activate ]; then
echo "Creating new venv in: ./.venv"
python3 -m venv ./.venv
fi
echo "Loading virtualenv: ./.venv"
source ./.venv/bin/activate
echo "Loading virtualenv: ./.venv"
source ./.venv/bin/activate
else
echo "Skipping venv setup"
fi
bin/docker-entry.sh
View file @
4d04569f
#!/usr/bin/env bash
source
./_venv
source
./
bin/
_venv
if
[
"
$1
"
!=
""
]
&&
[
-f
$1
]
;
then
echo
"Using provided .env file:
$1
"
...
...
bin/install.sh
View file @
4d04569f
...
...
@@ -8,6 +8,6 @@ pip3 install -r requirements.txt --no-cache-dir
if
[
$?
-eq
0
]
;
then
echo
-e
"
\n
----------------------------"
echo
-e
"Almost done!
\\
o/
\n
"
echo
"Run 'PYTHON_ENV=[development|prodcution] ./docker-entry.sh .env.example' to start the server!"
echo
"Run 'PYTHON_ENV=[development|prodcution] ./
bin/
docker-entry.sh .env.example' to start the server!"
echo
-e
"
\n
If you want to make changes to the python packages, e.g. 'pip3 install ...', activate the venv, first: '. .venv/bin/activate'"
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment