Severian commited on
Commit
17df3ec
·
verified ·
1 Parent(s): 53b476f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -8
Dockerfile CHANGED
@@ -9,7 +9,12 @@ ENV POETRY_VERSION=1.8.4 \
9
  POETRY_CACHE_DIR=/tmp/poetry_cache \
10
  PYTHONDONTWRITEBYTECODE=1
11
 
12
- # Install system dependencies and create user first
 
 
 
 
 
13
  RUN apt-get update && apt-get install -y \
14
  sudo \
15
  curl \
@@ -27,13 +32,8 @@ RUN apt-get update && apt-get install -y \
27
  && pip install --no-cache-dir "poetry==${POETRY_VERSION}" \
28
  && useradd -m -u 1000 user \
29
  && usermod -aG sudo user \
30
- && echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
31
-
32
- # Create directories with correct permissions
33
- RUN mkdir -p /app/api /app/web /data/storage /var/lib/postgresql/data && \
34
- chmod 777 /data /app && \
35
- chown -R postgres:postgres /var/lib/postgresql && \
36
- chmod 700 /var/lib/postgresql/data
37
 
38
  # Initialize PostgreSQL database as postgres user
39
  USER postgres
 
9
  POETRY_CACHE_DIR=/tmp/poetry_cache \
10
  PYTHONDONTWRITEBYTECODE=1
11
 
12
+ # Create directories with correct permissions first
13
+ RUN mkdir -p /app/api /app/web /data/storage /var/lib/postgresql/data && \
14
+ chmod 777 /data /app && \
15
+ chmod 700 /var/lib/postgresql/data
16
+
17
+ # Install system dependencies and create user
18
  RUN apt-get update && apt-get install -y \
19
  sudo \
20
  curl \
 
32
  && pip install --no-cache-dir "poetry==${POETRY_VERSION}" \
33
  && useradd -m -u 1000 user \
34
  && usermod -aG sudo user \
35
+ && echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
36
+ && chown -R postgres:postgres /var/lib/postgresql
 
 
 
 
 
37
 
38
  # Initialize PostgreSQL database as postgres user
39
  USER postgres