You can hover over the Visual Studio Code Terminal example below to make a Copy button appear on the right hand side. Go ahead and try it now. Then just click the Copy button to copy the command and paste it into the terminal to bring up the file in your VSCode editor to make changes to the file. This functionality will be available in many of the tasks throughout this lab.
code -r /home/cisco/CiscoLive/DEVWKS-2135/docker-compose.yml
Copy the content below to the docker-compose.yml playbook file and press Ctrl+s
to save the
file.
version: "2.1"
services:
yangsuite:
container_name: yangsuite
image: yangsuite:latest
build:
context: ./yangsuite
dockerfile: ./Dockerfile
env_file:
- ./yangsuite/setup.env
command: /yangsuite/migrate_and_start.sh
volumes:
- static-content:/ys-static
- uwsgi:/yangsuite/uwsgi
- ./ys-data:/ys-data
nginx:
container_name: nginx
image: nginx:latest
build:
context: ./nginx
dockerfile: ./Dockerfile
depends_on:
- yangsuite
ports:
- "80:80"
- "8443:8443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- static-content:/etc/nginx/html
- uwsgi:/var/run/uwsgi
volumes:
static-content:
uwsgi:
Run the
docker-compose.yml
file via the below command.
docker-compose up
If the output is not similar to the below output, please notifiy the lab instructor
➜ DEVWKS-2135 ✗ | docker-compose up
[+] Running 2/0
⠿ Container yangsuite Created 0.0s
⠿ Container nginx Created 0.0s
Attaching to nginx, yangsuite
nginx | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf is not a file or does not exist
nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
nginx | /docker-entrypoint.sh: Configuration complete; ready for start up
yangsuite | /usr/local/lib/python3.6/dist-packages/ysdevices/utilities.py:4: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography (40.0) will be the last to support Python 3.6.
yangsuite | from cryptography.fernet import Fernet
yangsuite | 2023-02-02 11:25:34,475 - yangsuite.ysgnmi.gnmi: WARNING: Install yangsuite-testmanager for opfield verification
yangsuite |