setup for Akiras Laptop

This commit is contained in:
2024-04-22 00:08:34 +09:00
parent bfe5a9440c
commit f0114ef33c
5 changed files with 25 additions and 5 deletions

View File

@ -1,5 +1,8 @@
# FROM python:3.9.9-slim-buster
FROM osgeo/gdal:ubuntu-small-3.4.0
# Akira
FROM python:3.10
FROM ubuntu:latest
WORKDIR /app
@ -14,6 +17,13 @@ ARG TZ Asia/Tokyo \
RUN apt-get update -y
# 必要なライブラリのインストール by akira
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:ubuntugis/ppa && \
apt-get update && \
apt-get install -y gdal-bin libgdal-dev python3-gdal
# Install GDAL dependencies
RUN apt-get install -y libgdal-dev g++ --no-install-recommends && \
apt-get clean -y
@ -23,7 +33,7 @@ ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal
RUN apt-get update \
&& apt-get -y install netcat gcc postgresql \
&& apt-get -y install netcat-openbsd gcc postgresql \
&& apt-get clean
RUN apt-get update \
@ -56,7 +66,9 @@ RUN pip install -r requirements.txt
COPY . /app
# Collect static files
RUN python manage.py collectstatic --noinput
RUN python3 manage.py collectstatic --noinput
# Use Gunicorn as the entrypoint
CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:8000"]