feat(blinko): add blinko with postgres

This commit is contained in:
redbeardymcgee 2024-12-26 15:42:32 -06:00
parent a03913a639
commit 9d4f1bc7a7
4 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,25 @@
[Unit]
Description=Postgres for Blinko
Wants=blinko.service
[Service]
Restart=on-failure
TimeoutStartSec=900
[Install]
WantedBy=default.target
[Container]
Image=docker.io/postgres
ContainerName=blinko-db
HostName=blinko-db
PublishPort=5435:5432
Volume=blinko-db:/var/lib/postgresql/data
Environment=POSTGRES_DB=postgres
Environment=POSTGRES_USER=postgres
Environment=TZ=Etc/UTC
Secret=blinko-db-pw,type=env,target=POSTGRES_PASSWORD

View file

@ -0,0 +1,27 @@
[Unit]
Description=Blinko
Requires=blinko-db.service
After=blinko-db.service
[Service]
Restart=on-failure
TimeoutStartSec=900
[Install]
WantedBy=default.target
[Container]
Image=docker.io/blinkospace/blinko
ContainerName=blinko
HostName=blinko
PublishPort=1111:1111
Volume=blinko-data:/app/.blinko
Environment=NODE_ENV=production
#Environment=NEXTAUTH_URL=http://localhost:1111
#Environment=NEXT_PUBLIC_BASE_URL=http://localhost:1111
Environment=DATABASE_URL=postgresql://postgres:$mysecretpassword@blinko-db:5432/postgres
Secret=blinko-nextauth-secret,type=env,target=NEXTAUTH_SECRET

View file

@ -0,0 +1,3 @@
[Volume]
VolumeName=blinko-data

View file

@ -0,0 +1,3 @@
[Volume]
VolumeName=blinko-db