feat: initial service definition
This commit is contained in:
commit
fd8efa01b2
2 changed files with 63 additions and 0 deletions
38
README.md
Normal file
38
README.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# vault
|
||||
|
||||
## Configuration
|
||||
|
||||
Three dotenv files are expected under `/etc/opt/...`:
|
||||
|
||||
```bash
|
||||
# vault-exporter.env
|
||||
|
||||
DATA_SOURCE_URI=<db-host>:<db-port>?sslmode=disable
|
||||
DATA_SOURCE_USER=<db-user>
|
||||
DATA_SOURCE_PASS=<db-pass>
|
||||
```
|
||||
|
||||
```bash
|
||||
# vault-db-init.env
|
||||
|
||||
POSTGRES_PASSWORD=<db-pass>
|
||||
```
|
||||
|
||||
```bash
|
||||
# vault-db.env
|
||||
|
||||
DATABASE_URL=<db-connection-string>
|
||||
```
|
||||
|
||||
## Volumes
|
||||
|
||||
The service will set up two volumes:
|
||||
|
||||
- `vault_db` - Postgres data volume used for persistent storage;
|
||||
- `vault_data` - Persistent storage for the application itself.
|
||||
|
||||
## Ports
|
||||
|
||||
The application is accessible via `:8082`.
|
||||
|
||||
Other ports are exposed (i.e. `:8083`) to allow telemetry polling.
|
25
service.yml
Normal file
25
service.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
name: vault
|
||||
ports:
|
||||
- host: 8082
|
||||
container: 80
|
||||
- host: 8083
|
||||
container: 9187
|
||||
volumes:
|
||||
- name: db
|
||||
- name: data
|
||||
containers:
|
||||
- name: db
|
||||
image: postgres:16.2 #Updated: 6/7/2024
|
||||
env-file: /etc/opt/spadinastan/vault-db-init.env
|
||||
volumes:
|
||||
- name: db
|
||||
container: /var/lib/postgresql/data
|
||||
- name: app
|
||||
image: vaultwarden/server:1.30.5-alpine #Updated: 6/7/2024
|
||||
env-file: /etc/opt/spadinastan/vault-db.env
|
||||
volumes:
|
||||
- name: data
|
||||
container: /data
|
||||
- name: pg-exporter
|
||||
image: quay.io/prometheuscommunity/postgres-exporter
|
||||
env-file: /etc/opt/spadinastan/vault-exporter.env
|
Loading…
Reference in a new issue