I've been watching and reading the "Ignition with Docker" series on the University. I noticed when I'm in powershell, my command starts out as PS C:\Users\ckc49>. But the video begins with PS C:.
Appreciate the response. Do you use docker compose? One thin I didn't understand, is Docker Compose already installed in Docker? Or do I need to download it?
I do not currently use Docker. Still find VMs somewhat better suited to my workflows.
My understanding is Docker Compose is an add-on to Docker. I vaguely recall that it requires Linux, but that might be old information. Others will certainly chime in.
In my workflow, I find it extremely convenient to leverage Docker Desktop, especially considering the multitude of Ignition projects I manage. I employ "Traefik" as a reverse proxy to facilitate access to Ignition instances via URLs like "ist01.localdev.me". I've borrowed some inspiration from examples, and I must say, it's been a seamless experience.
this is my docker-compose.yml just you for know
services:
init:
image: inductiveautomation/ignition:latest
container_name: ${COMPOSE_PROJECT_NAME}-init
entrypoint: sh -c
volumes:
# We mount this in the container as `/data` to not conflict with built-in>
# at `/usr/local/bin/ignition/data`
- ./data/gw:/data
- ./template:/template
- ./data/init:/db
command:
# Seed the files from the image to our /data if marker file not present, >
# if the marker file exists (and implicitly exit cleanly with status code>
# prepara the template sql
# create a sql file with a standard user
- |
if [ ! -f /data/.ignition-seed-complete ]; then
touch /data/.ignition-seed-complete ;
cp -dpR /usr/local/bin/ignition/data/* /data ;
rm -r /db/* ;
cp /template/* /db ;
echo "CREATE USER '${DB_USERNAME}'@'%' IDENTIFIED BY '${DB_PASSWORD}';" > /db/${DB_FILE_NAME}
echo "GRANT ALL PRIVILEGES ON *.* TO '${DB_USERNAME}'@'%';" >> /db/${DB_FILE_NAME}
sed -i -e 's/MYDBNAME/${COMPOSE_PROJECT_NAME}/g' /db/01-databases.sql;
fi
db:
image: mariadb
container_name: ${COMPOSE_PROJECT_NAME}-db
restart: unless-stopped
ports:
- 3306
volumes:
- ./data/init:/docker-entrypoint-initdb.d
- ./data/db:/var/lib/mysql
environment:
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
networks:
- default
depends_on:
init:
condition: service_completed_successfully
gw:
image: inductiveautomation/ignition:latest
container_name: ${COMPOSE_PROJECT_NAME}-gw
ports:
- 8088
restart: unless-stopped
volumes:
- ./data/gw:/usr/local/bin/ignition/data
environment:
- ACCEPT_IGNITION_EULA=Y
- IGNITION_EDITION=${IGNITION_EDITION}
- GATEWAY_ADMIN_USERNAME=${GATEWAY_ADMIN_USERNAME}
- GATEWAY_ADMIN_PASSWORD=${GATEWAY_ADMIN_PASSWORD}
command: >
-n ${COMPOSE_PROJECT_NAME}
-a ${COMPOSE_PROJECT_NAME}.localdev.me
-h 80
-s 443
labels:
traefik.enable: "true"
traefik.hostname: "${COMPOSE_PROJECT_NAME}"
depends_on:
init:
condition: service_completed_successfully
networks:
- proxy
- default
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: ${COMPOSE_PROJECT_NAME}-phpmyadmin
ports:
- 80
environment:
- PMA_HOST=db
depends_on:
- db
labels:
traefik.enable: "true"
traefik.hostname: "${COMPOSE_PROJECT_NAME}-admin"
networks:
- default
- proxy
networks:
default:
proxy:
external: true
name: proxy