# From docker-compose to rancher

**URL:** <https://forums.suse.com/t/from-docker-compose-to-rancher/7088>\
**Category:** Rancher 1.x\
**Created:** [August 11, 2017, 6:19pm UTC](https://forums.suse.com/t/from-docker-compose-to-rancher/7088 "2017-08-11T18:19:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![VincentGuyader](https://avatars.discourse-cdn.com/v4/letter/v/9e8a1a/32.png) [@VincentGuyader](https://forums.suse.com/u/VincentGuyader)\
**Post date:** [August 11, 2017, 6:19pm UTC](https://forums.suse.com/t/from-docker-compose-to-rancher/7088/1 "2017-08-11T18:19:51Z")

</div>

Hi everyone,

I’m quite new with Rancher, I read a lot of tutorials and documentation, and already made some cool things 😉

I successfully use this article [https://tech.acseo.co/sites-https-docker-nginx-lets-encrypt/](https://tech.acseo.co/sites-https-docker-nginx-lets-encrypt/) to deploy some wordpress website with ssl. It’s work perfect with this 2 docker-compose.yml

first :

```
nginx-proxy:
restart: always
image: jwilder/nginx-proxy
ports:
    - "80:80"
    - "443:443"
volumes:
    - /srv/docker/nginx/certs:/etc/nginx/certs:ro
    - /etc/nginx/vhost.d
    - /usr/share/nginx/html
    - /var/run/docker.sock:/tmp/docker.sock:ro

nginx-proxy-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
volumes:
    - /srv/docker/nginx/certs:/etc/nginx/certs:rw
    - /var/run/docker.sock:/var/run/docker.sock
volumes_from:
    - nginx-proxy

```

second :

```
db:
  image: mariadb
  environment:
    - MYSQL_ROOT_PASSWORD=MOTDEPASSEADEFINIR
wordpress:
  image: wordpress
  links:
    - db:mysql
  environment:
    - VIRTUAL_HOST=site1.url.fr
    - LETSENCRYPT_HOST=site1.url.fr
    - LETSENCRYPT_EMAIL=contact@url.fr 

```

But now I tried rancher to do it.  
I tried to simply upload the docker.compose.yml files in 2 différents stack

the “wordpress” stack seems ok, but with the “nginx-proxy” I have this error :

> Error (Bad response statusCode [422]. Status [422 status code 422]. Body: [fieldName=LaunchConfigName, baseType=error, code=InvalidReference] from [[http://localhost:8080/v2-beta/projects/1a5/services](http://localhost:8080/v2-beta/projects/1a5/services)])

And only one container is created.

Any idea why ?

 ![rancher](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/2/275eb0d617256e561b8efecadc3b9c5bcbed8b1e.png)

Regards

---

<div class="post-metadata">

**Author:** ![aidanoldershaw](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aidanoldershaw](https://forums.suse.com/u/aidanoldershaw)\
**Post date:** [August 14, 2017, 12:55pm UTC](https://forums.suse.com/t/from-docker-compose-to-rancher/7088/2 "2017-08-14T12:55:04Z")

</div>

I think you need to make the `nginx-proxy-companion` a sidekick of `nginx-proxy` using labels as follows:

```auto
nginx-proxy:
  labels:
    io.rancher.sidekicks: nginx-proxy-companion
  ...

```

More info is on this issue: [https://github.com/rancher/rancher/issues/1353#issuecomment-116289108](https://github.com/rancher/rancher/issues/1353#issuecomment-116289108).

---

<div class="post-metadata">

**Author:** ![VincentGuyader](https://avatars.discourse-cdn.com/v4/letter/v/9e8a1a/32.png) [@VincentGuyader](https://forums.suse.com/u/VincentGuyader)\
**Post date:** [August 15, 2017, 8:10pm UTC](https://forums.suse.com/t/from-docker-compose-to-rancher/7088/3 "2017-08-15T20:10:33Z")

</div>

thanks, it’s work! ( but I have now another problem… i think network issue… i will go further)
