代码拉取完成,页面将自动刷新
同步操作将从 mirrors_opencollective/pokeapi 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# Build the app on top of Ubuntu
FROM ubuntu:xenial
RUN echo 'deb http://ppa.launchpad.net/chris-lea/redis-server/ubuntu xenial main' > /etc/apt/sources.list.d/redis-server.list && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C7917B12
# Patch and Install Dependencies
RUN apt-get -y update && apt-get -y install git python-dev make python-pip libpq-dev postgresql postgresql-contrib redis-server && apt-get -y clean
# Updating redis config
RUN sed -i 's/# bind 127\.0\.0\.1/bind 127\.0\.0\.1/' /etc/redis/redis.conf
CMD mkdir -p /app && chown -R postgres:postgres /app
# Add python requirements to the image
ADD requirements.txt /app/requirements.txt
ADD test-requirements.txt /app/test-requirements.txt
# Set a working directory
WORKDIR /app/
# Build the application
RUN pip install --no-cache-dir -r requirements.txt
# Add the application code to the image
ADD . /app/
# Start postgres database and use it while it is running in the container
# Create the default db user (ash)
RUN service postgresql start && \
service redis-server start && \
su - postgres -c "psql --command \"CREATE USER ash WITH PASSWORD 'pokemon'\"" && \
su - postgres -c "createdb -O ash pokeapi" && \
python manage.py migrate --settings=config.docker && \
echo "from data.v2.build import build_all; build_all(); quit()" | python -u manage.py shell --settings=config.docker
# Expose the app and serve the API.
EXPOSE 8000
CMD service postgresql start && service redis-server start && python manage.py runserver --settings=config.docker 0.0.0.0:8000
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。