Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dockerfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Picasoft
Technique
Dockerfiles
Commits
00fa073a
Verified
Commit
00fa073a
authored
4 years ago
by
Quentin Duchemin
Browse files
Options
Downloads
Patches
Plain Diff
[Doc] Add volumes in template
parent
d0e97973
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
template/docker-compose.yml
+14
-3
14 additions, 3 deletions
template/docker-compose.yml
with
14 additions
and
3 deletions
template/docker-compose.yml
+
14
−
3
View file @
00fa073a
version
:
"
3.7"
volumes
:
#
Name
of Docker volume
#
Declaration
of Docker volume
# Also use a name so that Docker Compose does not add
# the current folder name
myvolume
:
name
:
myvolume
# Use as many volumes as you want : one for
# data, one for configuration, etc.
data
:
name
:
data
networks
:
# Best pratice : put all services that do not need
...
...
@@ -32,6 +34,15 @@ services:
networks
:
-
docker_default
-
app
volumes
:
# Mount the Docker Volume in the container
# to persist the data. The mount point
# is service-dependant.
-
data:/mount_point
# Exemple of mounting a file for configuration.
# This is not a Docker volume, but a versionned
# file is this repository.
-
./config.json:/config.json
# Don't put the .example extension, the real
# file will be a copy with real values
env_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