Skip to content

Commit

Permalink
sztp: use postgresql
Browse files Browse the repository at this point in the history
Fixes #104

Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Jul 12, 2022
1 parent edfe8e8 commit cb71ba8
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion integration/docker-compose.pxe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,38 @@ services:
build:
context: pxe
dockerfile: Dockerfile.sztp
depends_on:
- db
environment:
SZTPD_INIT_PORT: 1080
SZTPD_INIT_MODE: 1
SZTPD_ACCEPT_CONTRACT: "Yes"
network_mode: service:pxe
command: ['sztpd', 'sqlite:///:memory:']
command: ['sztpd', 'sztpd postgresql://sztpd-admin:[email protected]:5432/sztpd-db']
healthcheck:
test: curl --silent --fail -H Accept:application/yang-data+json http://localhost:1080/.well-known/host-meta || exit 1
interval: 6s
timeout: 10s
retries: 5

db:
image: postgres:9.5
volumes:
- sztp_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: sztpd-db
POSTGRES_USER: sztpd-admin
POSTGRES_PASSWORD: secret
network_mode: service:pxe
healthcheck:
test: ["CMD", "pg_isready", "-U", "sztpd-admin"]
interval: 30s
timeout: 30s
retries: 3

volumes:
sztp_data: {}

networks:
opi:
name: opi
Expand Down

0 comments on commit cb71ba8

Please sign in to comment.