File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ RUN apt-get update && apt-get install -y \
3232 ca-certificates \
3333 wget \
3434 netcat \
35+ postgresql-client \
3536 && rm -rf /var/lib/apt/lists/*
3637
3738# Install IPFS
@@ -47,8 +48,6 @@ COPY --from=builder /usr/src/graph-node/target/release/graph-node /usr/local/bin
4748
4849# Set environment variables
4950ENV RUST_LOG=info
50- ENV PGDATA="/var/lib/postgresql/data"
51- ENV POSTGRES_INITDB_ARGS="-E UTF8 --locale=C"
5251
5352# Expose necessary ports
5453EXPOSE 8000 8001 8030 5001
@@ -57,6 +56,16 @@ EXPOSE 8000 8001 8030 5001
5756RUN echo '#!/bin/bash\n \
5857set -e\n \
5958\n \
59+ echo "Checking database locale..."\n \
60+ DB_LOCALE=$(psql -tAc "SHOW lc_collate;" $POSTGRES_URL)\n \
61+ if [ "$DB_LOCALE" != "C" ]; then\n \
62+ echo "Database locale is not C. Attempting to modify..."\n \
63+ psql $POSTGRES_URL << EOF\n \
64+ UPDATE pg_database SET datcollate="C", datctype="C" WHERE datname="railway";\n \
65+ EOF\n \
66+ echo "Database locale updated. Please restart the database for changes to take effect."\n \
67+ fi\n \
68+ \n \
6069echo "Initializing IPFS..."\n \
6170if [ ! -f /root/.ipfs/config ]; then\n \
6271 ipfs init\n \
You can’t perform that action at this time.
0 commit comments