diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4582827 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Ensure shell scripts always use LF line endings, even on Windows +*.sh text eol=lf \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 620a6b9..58d021a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,12 +1,13 @@ --- services: gateway: - image: inductiveautomation/ignition:8.3.0-rc1 + image: inductiveautomation/ignition:8.3.1 + ports: + - "8088:8088" volumes: - ./services/ignition/config:/usr/local/bin/ignition/data/config - ./services/ignition/projects:/usr/local/bin/ignition/data/projects - ./shared/gateway-utilities/projects/gateway-utilities:/usr/local/bin/ignition/data/projects/gateway-utilities - # Temporary volume to skip commissioning - ./services/ignition/commissioning.json:/usr/local/bin/ignition/data/commissioning.json environment: @@ -24,10 +25,11 @@ services: -n ignition83 -- -Dignition.config.mode=local-dev - labels: traefik.enable: "true" - traefik.hostname: "ignition83" + traefik.http.routers.ignition.rule: "Host(`ignition83.localtest.me`)" + traefik.http.routers.ignition.entrypoints: "websecure" + traefik.http.services.ignition.loadbalancer.server.port: "8088" networks: - default - proxy @@ -47,6 +49,7 @@ services: - database volumes: - ./services/postgres:/database + - ./services/postgres/postgresql.jar:/liquibase/lib/postgresql.jar - ./scripts/wait-for-it.sh:/wait-for-it.sh entrypoint: ["/wait-for-it.sh", "postgres:5432", "--", "liquibase", "--defaultsFile=/database/liquibase/liquibase.docker.properties", "update"] @@ -60,13 +63,42 @@ services: - ./services/pgadmin/servers.json:/pgadmin4/servers.json labels: traefik.enable: "true" - traefik.hostname: "postgres-pgadmin" + traefik.http.routers.pgadmin.rule: "Host(`postgres-pgadmin.localtest.me`)" + traefik.http.routers.pgadmin.entrypoints: "websecure" + traefik.http.services.pgadmin.loadbalancer.server.port: "80" networks: - default - proxy + proxy: + image: traefik:latest + container_name: traefik + restart: always + ports: + - "80:80" + - "443:443" + - "8090:8080" # Traefik dashboard (direct access) + environment: + - TRAEFIK_ENTRYPOINTS_WEB_ADDRESS=:80 + - TRAEFIK_ENTRYPOINTS_WEBSECURE_ADDRESS=:443 + - TRAEFIK_ENTRYPOINTS_WEBSECURE_HTTP_TLS=true + - TRAEFIK_API_DASHBOARD=true + - TRAEFIK_API_INSECURE=true + - TRAEFIK_PROVIDERS_DOCKER=true + - TRAEFIK_PROVIDERS_DOCKER_EXPOSEDBYDEFAULT=false + - TRAEFIK_PROVIDERS_DOCKER_NETWORK=proxy + labels: + traefik.enable: "true" + traefik.http.routers.proxy.rule: "Host(`proxy.localtest.me`)" + traefik.http.routers.proxy.entrypoints: "websecure" + traefik.http.routers.proxy.service: "api@internal" + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + networks: + - proxy + networks: default: proxy: external: true - name: proxy + name: proxy \ No newline at end of file diff --git a/readme.md b/readme.md index 8acabbb..4e0623d 100644 --- a/readme.md +++ b/readme.md @@ -42,6 +42,7 @@ A Docker Compose template for quickly setting up an Ignition 8.3 gateway with Po | gateway | Ignition 8.3 Gateway | https://ignition83.localtest.me | | database | PostgreSQL 16 | localhost:5432 | | pgadmin | Database administration | https://postgres-pgadmin.localtest.me | +| proxy | Traefik reverse proxy | https://proxy.localtest.me | | liquibase | Database migrations | Runs once on startup | ## Database Setup diff --git a/services/postgres/postgresql.jar b/services/postgres/postgresql.jar new file mode 100644 index 0000000..091b4d1 Binary files /dev/null and b/services/postgres/postgresql.jar differ