Describe volume mapping

install-doc
Marcin Kulik 7 years ago
parent e362884a58
commit 3d2c65ebe9

@ -1,4 +1,5 @@
.git
.gitignore
.stuff
.bundle
tmp/*
@ -6,6 +7,7 @@ log/*
target
uploads/*
coverage
volumes
Dockerfile
docker-compose.yml
a2png/main.js
@ -16,4 +18,4 @@ a2png/target
config/asciinema.yml
config/database.yml
.env
.env.*
.env.*

2
.gitignore vendored

@ -37,3 +37,5 @@ pom.xml.asc
/profiles.clj
/dev/resources/local.edn
/dev/src/local.clj
/volumes

@ -1,22 +1,12 @@
version: '2'
# Quickstart:
# docker-compose run --rm db_init
# docker-compose up -d web
# To cleanup:
# docker-compose stop && docker-compose rm
services:
postgres:
image: postgres
container_name: asciinema_postgres
restart: unless-stopped
### Uncomment to enable DB persistence
# volumes:
# - ./postgres:/var/lib/postgresql/data
volumes:
- ./volumes/postgres:/var/lib/postgresql/data
### See https://hub.docker.com/_/postgres/ for more
### configuration options for this image.
@ -24,11 +14,8 @@ services:
image: redis
container_name: asciinema_redis
restart: unless-stopped
### Uncomment to enable Redis persistence
# volumes:
# - ./redis:/data
volumes:
- ./volumes/redis:/data
### See https://hub.docker.com/_/redis/ for more
### configuration options for this image.
@ -44,14 +31,14 @@ services:
env_file: .env.production
command: "bundle exec sidekiq"
volumes:
- /tmp/asciinema/uploads:/app/uploads
- ./uploads:/app/uploads
- ./log:/app/log
smtp:
image: namshi/smtp
container_name: asciinema_smtp
restart: unless-stopped
env_file: .env.production
### See https://github.com/namshi/docker-smtp for more SMTP configuration
### options for this image.
@ -70,4 +57,5 @@ services:
ports:
- "3000:80"
volumes:
- /tmp/asciinema/uploads:/app/uploads
- ./uploads:/app/uploads
- ./log:/app/log

@ -99,6 +99,16 @@ variables to the config file.
by default. You can set these so they point to your existing services. Look at
"Service Requirements" above for minimum versions supported.
### Specify volume mappings
The container has two volumes, for user uploads and for application logs. The
default `docker-compose.yml` maps them to the repository's `uploads` and `log`
directories, you may wish to put them somewhere else.
Likewise, the PostgreSQL and Redis images have data volumes that you may wish to
map somewhere where you know how to find them and back them up. By default
they're mapped inside repository's `volumes` directory.
### Initialize the database
Now, once you have the config file ready, create database schema and seed it

Loading…
Cancel
Save