mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Add media upload functionality and create uploads
folder
This commit is contained in:
parent
ca94c35bc4
commit
8fa16d4e09
7 changed files with 318 additions and 16 deletions
21
Postgres.Dockerfile
Normal file
21
Postgres.Dockerfile
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Use the latest Postgres Docker image based on Alpine
|
||||
FROM postgres:alpine
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install curl
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
RUN cd "$(mktemp -d)" \
|
||||
&& curl -LO "https://github.com/fboulnois/pg_uuidv7/releases/download/v1.3.0/{pg_uuidv7.tar.gz,SHA256SUMS}" \
|
||||
&& tar xf pg_uuidv7.tar.gz \
|
||||
&& sha256sum -c SHA256SUMS \
|
||||
&& PG_MAJOR=$(pg_config --version | sed 's/^.* \([0-9]\{1,\}\).*$/\1/') \
|
||||
&& cp "$PG_MAJOR/pg_uuidv7.so" "$(pg_config --pkglibdir)" \
|
||||
&& cp sql/pg_uuidv7--1.3.sql pg_uuidv7.control "$(pg_config --sharedir)/extension"
|
||||
# Add a script to run the CREATE EXTENSION command
|
||||
RUN echo '#!/bin/sh\npsql -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE EXTENSION pg_uuidv7;"' > /docker-entrypoint-initdb.d/init.sh
|
||||
|
||||
# Make the entrypoint script executable
|
||||
RUN chmod +x /docker-entrypoint-initdb.d/init.sh
|
||||
Loading…
Add table
Add a link
Reference in a new issue