mirror of
https://codeberg.org/MarkusThielker/finances.git
synced 2025-07-01 19:19:18 +00:00
N-FIN-1: customise template
This commit is contained in:
parent
52aed24a96
commit
b9bdf36872
12 changed files with 29 additions and 54 deletions
1
docker/finances-prod/.gitignore
vendored
Normal file
1
docker/finances-prod/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
postgres-data/
|
76
docker/finances-prod/docker-compose.yaml
Normal file
76
docker/finances-prod/docker-compose.yaml
Normal file
|
@ -0,0 +1,76 @@
|
|||
services:
|
||||
|
||||
app-migrations:
|
||||
container_name: next_finances_migrations
|
||||
image: markusthielker/next-finances:1.0.0
|
||||
env_file:
|
||||
- .env
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
command: [ "npx", "prisma", "migrate", "deploy" ]
|
||||
networks:
|
||||
- internal
|
||||
|
||||
app:
|
||||
container_name: next_finances_app
|
||||
image: markusthielker/next-finances: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-next-finances.rule=Host(`finances.thielker.xyz`)"
|
||||
- "traefik.http.routers.xyz-next-finances.entrypoints=web, websecure"
|
||||
- "traefik.http.routers.xyz-next-finances.tls=true"
|
||||
- "traefik.http.routers.xyz-next-finances.tls.certresolver=lets-encrypt"
|
||||
networks:
|
||||
- web
|
||||
- internal
|
||||
|
||||
app-studio:
|
||||
container_name: next_finances_studio
|
||||
image: markusthielker/next-finances: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-next-finances-studio.rule=Host(`studio.finances.thielker.xyz`)"
|
||||
- "traefik.http.routers.xyz-next-finances-studio.entrypoints=web, websecure"
|
||||
- "traefik.http.services.xyz-next-finances-studio.loadbalancer.server.port=5555"
|
||||
- "traefik.http.routers.xyz-next-finances-studio.tls=true"
|
||||
- "traefik.http.routers.xyz-next-finances-studio.tls.certresolver=lets-encrypt"
|
||||
networks:
|
||||
- web
|
||||
- internal
|
||||
|
||||
postgres:
|
||||
container_name: next_finances_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: finances
|
||||
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