docker-compose ssh, how?

Locked
mrfloppy2005
New here
Posts: 6
Joined: Sat Jan 05, 2019 5:09 pm

docker-compose ssh, how?

Post by mrfloppy2005 »

I'd like to use docker-compose on the ssh.
My problem is that even if I only use one container, it makes an app out of it.
And so they are all in a certain dependency.
They cannot be started or restarted individually.
I would like to use single containers, but with docker-compose.
Anyone have an idea? or what am I doing wrong?
In the previous version that was still possible.
greets
Thomas
User avatar
howarmat
Know my way around
Posts: 179
Joined: Tue Aug 21, 2012 12:30 am

Re: docker-compose ssh, how?

Post by howarmat »

You would need separate docker compose files for each container you want to use. I made a separate shared directory just for all docker stuff, then a folder for each container with a docker-compose file for each. I also made any volumes required for that container point to this folder so it would be static and outside of the container station. You can then ssh and run the commands to rebuild at anytime with updated image

Hope this helps a little.

Sample file

Code: Select all

version: '3'
services:
  hydra2:
    container_name: Hydra2
    image: linuxserver/hydra2
    restart: unless-stopped
    environment:
      - TZ=America/Indianapolis
      - PUID=1000
      - PGID=1000
    volumes:
      - /share/DockApps/NZBHydra:/config
      - /share/Download:/downloads
    ports:
      - 5076:5076
mrfloppy2005
New here
Posts: 6
Joined: Sat Jan 05, 2019 5:09 pm

Re: docker-compose ssh, how?

Post by mrfloppy2005 »

hello
i´ve tried with only one Container in my docker-compose file, and it appears also as an APP. What version of CS do you use? 2.0.117 ?

greets
User avatar
howarmat
Know my way around
Posts: 179
Joined: Tue Aug 21, 2012 12:30 am

Re: docker-compose ssh, how?

Post by howarmat »

yes the newest update the other day
mrfloppy2005
New here
Posts: 6
Joined: Sat Jan 05, 2019 5:09 pm

Re: docker-compose ssh, how?

Post by mrfloppy2005 »

i have tried your docker-compose.yml
but i also get an APP:Docker and can not stop or remove the Container inside the CS GUI.
i get an error message.
I must stop it at the command line.
A view weeks ago i tried this an it works so. But since the update not.
mrfloppy2005
New here
Posts: 6
Joined: Sat Jan 05, 2019 5:09 pm

Re: docker-compose ssh, how?

Post by mrfloppy2005 »

i now have gone back to 1.9.3590 and for me now all is ok.
User avatar
musicfreak
Getting the hang of things
Posts: 91
Joined: Sun Aug 08, 2010 6:33 pm

Re: docker-compose ssh, how?

Post by musicfreak »

for that start stop thing i also had the same problem but Logicwar had a sollution.
they changed the directory where the dockers are now. So it need to be there. I still have problems with some files after this.
Logicwar wrote: Mon Apr 22, 2019 1:06 am Had the same problem.

You can fix it by creating a folder with the name of your application in the following folder:

/share/CACHEDEV1_DATA/Container/container-station-data/application/

In that directory you should have the following two files
- docker-compose.yml : your application yml file
- qnap.json : should contain the following texte with the application name replaced by your appplication name : {"services": ["application name"], "httpPort": 0, "name": "application name", "createFrom": "custom"}

You can try to create a new application from the gui and see what get's created in the folder.

What drives me crazy now, is that all containers starts after rebooting the QNAP. Can't find out how to disable this. Already tried to add in the docker-compose.yml file [restart: "no"] with no success.
User avatar
howarmat
Know my way around
Posts: 179
Joined: Tue Aug 21, 2012 12:30 am

Re: docker-compose ssh, how?

Post by howarmat »

So I actually just created the folders and added the docker-compose file and not I can start and stop without issue. No qnap.json needed that I can tell
Locked

Return to “Container Station”