Refactor Docker configuration for Linkwarden and PostgreSQL; update .gitignore and add .env file
This commit is contained in:
+18
-31
@@ -1,34 +1,21 @@
|
||||
version: '3.8'
|
||||
|
||||
version: "3.5"
|
||||
services:
|
||||
linkwarden:
|
||||
image: linkwarden/linkwarden:latest
|
||||
container_name: linkwarden
|
||||
ports:
|
||||
- "3000:3000" # Cambia el puerto si es necesario
|
||||
volumes:
|
||||
- ./linkwarden_data:/app/data # Persistencia de datos
|
||||
environment:
|
||||
# Configuración del entorno de Linkwarden
|
||||
NODE_ENV: production
|
||||
ADMIN_EMAIL: admin@example.com # Cambia por tu correo de administrador
|
||||
ADMIN_PASSWORD: adminpassword # Cambia esta contraseña por una segura
|
||||
PORT: 3000
|
||||
DATABASE_TYPE: postgres
|
||||
DATABASE_URL: postgres://linkwarden:linkwardenpassword@postgres:5432/linkwarden
|
||||
depends_on:
|
||||
- postgres
|
||||
restart: unless-stopped
|
||||
|
||||
postgres:
|
||||
image: postgres:15
|
||||
container_name: postgres
|
||||
environment:
|
||||
POSTGRES_USER: linkwarden
|
||||
POSTGRES_PASSWORD: linkwardenpassword
|
||||
POSTGRES_DB: linkwarden
|
||||
image: postgres:16-alpine
|
||||
env_file: .env
|
||||
restart: always
|
||||
volumes:
|
||||
- ./postgres_data:/var/lib/postgresql/data # Persistencia de datos
|
||||
restart: unless-stopped
|
||||
|
||||
|
||||
- ./pgdata:/var/lib/postgresql/data
|
||||
linkwarden:
|
||||
env_file: .env
|
||||
environment:
|
||||
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres
|
||||
restart: always
|
||||
# build: . # uncomment this line to build from source
|
||||
image: ghcr.io/linkwarden/linkwarden:latest # comment this line to build from source
|
||||
ports:
|
||||
- 5000:3000
|
||||
volumes:
|
||||
- ./data:/data/data
|
||||
depends_on:
|
||||
- postgres
|
||||
Reference in New Issue
Block a user