Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
ViaResto-website
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aymeric Chaumont
ViaResto-website
Commits
f8314620
Commit
f8314620
authored
3 years ago
by
Antoine Gaudron-Desjardins
Browse files
Options
Downloads
Patches
Plain Diff
add docker-compose
parent
ff8a1329
Branches
Branches containing commit
No related tags found
1 merge request
!2
Back
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
backend/Dockerfile
+23
-0
23 additions, 0 deletions
backend/Dockerfile
backend/docker-compose.yml
+15
-1
15 additions, 1 deletion
backend/docker-compose.yml
backend/requirements.txt
+3
-0
3 additions, 0 deletions
backend/requirements.txt
with
41 additions
and
1 deletion
backend/Dockerfile
0 → 100644
+
23
−
0
View file @
f8314620
FROM
python:3.9
AS
build
## virtualenv
RUN
python3
-m
venv /venv
ENV
PATH="/venv/bin:$PATH"
## add and install requirements
RUN
pip
install
--upgrade
pip
&&
pip
install
pip-tools
COPY
./requirements.txt ./
RUN
pip
install
-r
requirements.txt
FROM
python:3.9
AS
runtime
EXPOSE
80
ENV
PATH="/venv/bin:$PATH"
COPY
--from=build /venv /venv
WORKDIR
/backend
COPY
. .
ENTRYPOINT
["python3", "main.py"]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
backend/docker-compose.yml
+
15
−
1
View file @
f8314620
...
@@ -9,3 +9,17 @@ services:
...
@@ -9,3 +9,17 @@ services:
command
:
[
"
mysqld"
,
"
--authentication-policy=mysql_native_password"
]
command
:
[
"
mysqld"
,
"
--authentication-policy=mysql_native_password"
]
ports
:
ports
:
-
"
3306:3306"
-
"
3306:3306"
app
:
container_name
:
"
app"
build
:
.
depends_on
:
-
db
restart
:
always
ports
:
-
8000:80
env_file
:
.env
environment
:
DB_HOST
:
db
links
:
-
db
\ No newline at end of file
This diff is collapsed.
Click to expand it.
backend/requirements.txt
+
3
−
0
View file @
f8314620
...
@@ -12,3 +12,6 @@ sniffio==1.2.0
...
@@ -12,3 +12,6 @@ sniffio==1.2.0
starlette==0.19.1
starlette==0.19.1
typing-extensions==4.2.0
typing-extensions==4.2.0
uvicorn==0.17.6
uvicorn==0.17.6
SQLAlchemy==1.4.19
python-dotenv==0.18.0
PyMySQL==1.0.2
\ No newline at end of file
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