S
S
spaceatmoon2018-06-20 21:18:49
Docker
spaceatmoon, 2018-06-20 21:18:49

How to synchronize edits of working code without reloading the application under docker-compose?

I want to finalize redmine and decided to try it on a separate wheelbarrow for a quick deployment under the docker.
I use the config from the example: https://github.com/sameersbn/docker-redmine

docker-compose.yml
version: '2'

services:
  postgresql:
    image: sameersbn/postgresql:9.6-2
    environment:
    - DB_USER=redmine
    - DB_PASS=password
    - DB_NAME=redmine_production
    volumes:
    - /srv/docker/redmine/postgresql:/var/lib/postgresql

  redmine:
    image: sameersbn/redmine:3.4.6
    depends_on:
    - postgresql
    environment:
    - TZ=Asia/Kolkata

    - DB_ADAPTER=postgresql
    - DB_HOST=postgresql
    - DB_PORT=5432
    - DB_USER=redmine
    - DB_PASS=password
    - DB_NAME=redmine_production

    - REDMINE_PORT=10083
    - REDMINE_HTTPS=false
    - REDMINE_RELATIVE_URL_ROOT=
    - REDMINE_SECRET_TOKEN=

    - REDMINE_SUDO_MODE_ENABLED=false
    - REDMINE_SUDO_MODE_TIMEOUT=15

    - REDMINE_CONCURRENT_UPLOADS=2

    - REDMINE_BACKUP_SCHEDULE=
    - REDMINE_BACKUP_EXPIRY=
    - REDMINE_BACKUP_TIME=

    - SMTP_ENABLED=false
    - SMTP_METHOD=smtp
    - SMTP_DOMAIN=www.example.com
    - SMTP_HOST=smtp.gmail.com
    - SMTP_PORT=587
    - [email protected]
    - SMTP_PASS=password
    - SMTP_STARTTLS=true
    - SMTP_AUTHENTICATION=:login

    - IMAP_ENABLED=false
    - IMAP_HOST=imap.gmail.com
    - IMAP_PORT=993
    - [email protected]
    - IMAP_PASS=password
    - IMAP_SSL=true
    - IMAP_INTERVAL=30

    ports:
    - "10083:80"
    volumes:
    - /srv/docker/redmine/redmine:/home/redmine/data


The problem is that the folder from volumes is successfully replaced with the one in the container, and, as it were, that's it.
How to modify the config or what commands to use so that my code from a non-container is synchronized with what is in the container.
Found only one team similar to the truth, but looks like a crutch. I didn’t have time to try, because. the folder from the config is no longer mounted.
docker-compose redmine exec cp /srv/docker/redmine/redmine /home/redmine/data

How do you generally develop under docker? I'm trying it for the second time and it's so uncomfortable.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question