Skip to content

Instantly share code, notes, and snippets.

@zeroc0d3
Last active June 28, 2023 14:30
Show Gist options
  • Save zeroc0d3/d029963ca1e5800ba21543581945a1ff to your computer and use it in GitHub Desktop.
Save zeroc0d3/d029963ca1e5800ba21543581945a1ff to your computer and use it in GitHub Desktop.
Rancher v2.7.5-rc6 Docker Compose
version: "3.7"
#================================================================================================
# NETWORK SETUP
#================================================================================================
networks:
devopscorner_net:
name: devopscorner_net
driver: bridge
ipam:
config:
- subnet: 172.135.135.0/16
#================================================================================================
# VOLUME SETUP
#================================================================================================
volumes:
vol_portainer:
driver: ${VOLUMES_DRIVER:-local}
driver_opts:
o: bind
type: none
device: ${DATA_PORTAINER:-/opt/data/docker/portainer2.9}
vol_rancher_v27:
driver: ${VOLUMES_DRIVER:-local}
driver_opts:
o: bind
type: none
device: ${DATA_RANCHER:-/opt/data/docker/rancher2.7}
services:
#================================================================================================
# PORTAINER
#================================================================================================
portainer:
image: dockerframework/portainer:${PORTAINER_VERSION:-2.9}
container_name: ${CONTAINER_PORTAINER:-devopscorner_portainer}
restart: unless-stopped
ports:
- "${PORT_PORTAINER:-5212}:9000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- vol_portainer:/data
environment:
- PORTAINER_TEMPLATE=generic
- PORTAINER_VERSION=${PORTAINER_VERSION:-2.9}
privileged: true
tty: true
networks:
devopscorner_net:
ipv4_address: ${CONTAINER_IP_PORTAINER:-172.135.135.5}
#================================================================================================
# RANCHER
#================================================================================================
rancher:
image: rancher/rancher:v2.7.5-rc6
container_name: ${CONTAINER_RANCHER:-devopscorner_rancher}
restart: unless-stopped
ports:
- "${PORT_RANCHER_HTTP:-80}:80"
- "${PORT_RANCHER_HTTPS:-443}:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- vol_rancher_v27:/var/lib/rancher
# - ${DATA_RANCHER_CACERT:-/opt/data/docker/rancher/cacerts.pem}:/etc/rancher/ssl/cacerts.pem
# - ${DATA_RANCHER_KEY:-/opt/data/docker/rancher/key.pem}:/etc/rancher/ssl/key.pem
# - ${DATA_RANCHER_CERT:-/opt/data/docker/rancher/cert.pem}:/etc/rancher/ssl/cert.pem
environment:
- CATTLE_UI_VERSION=2.7.5
- CATTLE_DASHBOARD_UI_VERSION=v2.7.5
- CATTLE_CLI_VERSION=v2.7.0
- CATTLE_API_UI_VERSION=1.1.10
- CATTLE_SERVER_VERSION=v2.7.5-rc6
ulimits:
nproc: 131072
nofile:
soft: 8192
hard: 131072
memlock:
soft: -1
hard: -1
privileged: true
tty: true
networks:
devopscorner_net:
ipv4_address: ${CONTAINER_IP_RANCHER:-172.135.135.90}
# Get Rancher First Login Authorize:
# ----------------------------------
# docker exec -it devopscorner_rancher bash
# kubectl get secret --namespace cattle-system bootstrap-secret -o go-template='{{.data.bootstrapPassword|base64decode}}{{"\n"}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment