mirror of
https://codeberg.org/MarkusThielker/finances.git
synced 2025-07-01 11:09:18 +00:00
Initial commit
This commit is contained in:
commit
52aed24a96
48 changed files with 6980 additions and 0 deletions
1
docker/base-dev/.gitignore
vendored
Normal file
1
docker/base-dev/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
postgres-data/
|
19
docker/base-dev/docker-compose.yaml
Normal file
19
docker/base-dev/docker-compose.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
services:
|
||||
|
||||
postgres:
|
||||
container_name: base_postgres
|
||||
image: postgres:15.2
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "pg_isready" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
ports:
|
||||
- 127.0.0.1:5432:5432
|
||||
environment:
|
||||
POSTGRES_USER: prisma
|
||||
POSTGRES_PASSWORD: prisma
|
||||
POSTGRES_DB: base
|
||||
volumes:
|
||||
- ./postgres-data:/var/lib/postgresql/data
|
1
docker/base-prod/.gitignore
vendored
Normal file
1
docker/base-prod/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
postgres-data/
|
76
docker/base-prod/docker-compose.yaml
Normal file
76
docker/base-prod/docker-compose.yaml
Normal file
|
@ -0,0 +1,76 @@
|
|||
services:
|
||||
|
||||
app-migrations:
|
||||
container_name: base_migrations
|
||||
image: markusthielker/next-base:1.0.0
|
||||
env_file:
|
||||
- .env
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
command: [ "npx", "prisma", "migrate", "deploy" ]
|
||||
networks:
|
||||
- internal
|
||||
|
||||
app:
|
||||
container_name: base_app
|
||||
image: markusthielker/next-base:1.0.0
|
||||
env_file:
|
||||
- .env
|
||||
depends_on:
|
||||
app-migrations:
|
||||
condition: service_completed_successfully
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.xyz-base.rule=Host(`base.thielker.xyz`)"
|
||||
- "traefik.http.routers.xyz-base.entrypoints=web, websecure"
|
||||
- "traefik.http.routers.xyz-base.tls=true"
|
||||
- "traefik.http.routers.xyz-base.tls.certresolver=lets-encrypt"
|
||||
networks:
|
||||
- web
|
||||
- internal
|
||||
|
||||
app-studio:
|
||||
container_name: base_studio
|
||||
image: markusthielker/next-base:1.0.0
|
||||
env_file:
|
||||
- .env
|
||||
depends_on:
|
||||
app-migrations:
|
||||
condition: service_completed_successfully
|
||||
command: "npx prisma studio"
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.xyz-base-studio.rule=Host(`db.base.thielker.xyz`)"
|
||||
- "traefik.http.routers.xyz-base-studio.entrypoints=web, websecure"
|
||||
- "traefik.http.services.xyz-finances-db.loadbalancer.server.port=5555"
|
||||
- "traefik.http.routers.xyz-base-studio.tls=true"
|
||||
- "traefik.http.routers.xyz-base-studio.tls.certresolver=lets-encrypt"
|
||||
networks:
|
||||
- web
|
||||
- internal
|
||||
|
||||
postgres:
|
||||
container_name: base_postgres
|
||||
image: postgres:15.2
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "pg_isready" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
environment:
|
||||
POSTGRES_USER: prisma
|
||||
POSTGRES_PASSWORD: prisma
|
||||
POSTGRES_DB: base
|
||||
volumes:
|
||||
- ./postgres-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- internal
|
||||
|
||||
networks:
|
||||
web:
|
||||
external: true
|
||||
internal:
|
Loading…
Add table
Add a link
Reference in a new issue