This repository is an example of deploying a Postgres database with NetBird in a docker host using docker compose
.
- Docker
- Docker compose
- A NetBird network and a setup key
Update the docker-compose.yml file with your setup key:
environment:
- NB_SETUP_KEY=<your setup key>
Run the container using the following command:
docker compose up -d
You can connect to the database using the following commands:
docker compose exec -ti postgres bash
su -l postgres
psql
Create the table using the following statement:
CREATE TABLE visits (
id SERIAL PRIMARY KEY,
ip_address VARCHAR(255),
visit_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
Remove the container using the following command:
docker compose down