Skip to content

Commit cb71ba8

Browse files
committed
sztp: use postgresql
Fixes #104 Signed-off-by: Boris Glimcher <[email protected]>
1 parent edfe8e8 commit cb71ba8

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

integration/docker-compose.pxe.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,38 @@ services:
3535
build:
3636
context: pxe
3737
dockerfile: Dockerfile.sztp
38+
depends_on:
39+
- db
3840
environment:
3941
SZTPD_INIT_PORT: 1080
4042
SZTPD_INIT_MODE: 1
4143
SZTPD_ACCEPT_CONTRACT: "Yes"
4244
network_mode: service:pxe
43-
command: ['sztpd', 'sqlite:///:memory:']
45+
command: ['sztpd', 'sztpd postgresql://sztpd-admin:[email protected]:5432/sztpd-db']
4446
healthcheck:
4547
test: curl --silent --fail -H Accept:application/yang-data+json http://localhost:1080/.well-known/host-meta || exit 1
4648
interval: 6s
4749
timeout: 10s
4850
retries: 5
4951

52+
db:
53+
image: postgres:9.5
54+
volumes:
55+
- sztp_data:/var/lib/postgresql/data
56+
environment:
57+
POSTGRES_DB: sztpd-db
58+
POSTGRES_USER: sztpd-admin
59+
POSTGRES_PASSWORD: secret
60+
network_mode: service:pxe
61+
healthcheck:
62+
test: ["CMD", "pg_isready", "-U", "sztpd-admin"]
63+
interval: 30s
64+
timeout: 30s
65+
retries: 3
66+
67+
volumes:
68+
sztp_data: {}
69+
5070
networks:
5171
opi:
5272
name: opi

0 commit comments

Comments
 (0)