-
-
Save DrOctogon/7cf5e317566eb915b2db4b9f819dd914 to your computer and use it in GitHub Desktop.
Linkwarden Docker Compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
volumes: | |
postgres: | |
services: | |
postgres: | |
image: postgres | |
restart: unless-stopped | |
healthcheck: | |
test: ["CMD-SHELL", "pg_isready -d linkwarden -U linkwarden || exit 1"] | |
interval: 5s | |
timeout: 5s | |
start_period: 30s | |
retries: 10 | |
environment: | |
POSTGRES_HOST_AUTH_METHOD: "trust" | |
POSTGRES_USER: linkwarden | |
POSTGRES_PASSWORD: Linkwarden123! | |
POSTGRES_DB: linkwarden | |
volumes: | |
- postgres:/var/lib/postgresql | |
linkwarden-migrate: &linkwarden-service | |
image: "linkwarden/linkwarden" | |
restart: on-failure | |
build: | |
context: https://github.com/linkwarden/linkwarden.git | |
dockerfile_inline: | | |
FROM node:20 | |
WORKDIR /opt/linkwarden | |
COPY . . | |
RUN yarn && \ | |
npx [email protected] install-deps && \ | |
yarn build | |
ENTRYPOINT ["yarn"] | |
CMD ["start"] | |
command: prisma migrate deploy | |
environment: | |
- DATABASE_URL=postgres://linkwarden:Linkwarden123!@postgres:5432/linkwarden?sslmode=disable&max_conns=20&max_idle_conns=4 | |
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET:-DR5o8dX6SR5#g*@7z!k2%8#sf5S@RR6F} | |
- NEXTAUTH_URL=${NEXTAUTH_URL:-http://localhost:3000} | |
- PAGINATION_TAKE_COUNT | |
- STORAGE_FOLDER | |
- SPACES_KEY | |
- SPACES_SECRET | |
- SPACES_ENDPOINT | |
- SPACES_REGION | |
- NEXT_PUBLIC_EMAIL_PROVIDER | |
- EMAIL_FROM | |
- EMAIL_SERVER | |
depends_on: | |
postgres: | |
condition: service_healthy | |
linkwarden: | |
<<: *linkwarden-service | |
restart: unless-stopped | |
command: start | |
ports: | |
- 3000:3000 | |
depends_on: | |
linkwarden-migrate: | |
condition: service_completed_successfully |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment