mirror of
https://github.com/pinry/pinry.git
synced 2025-11-02 19:36:01 +01:00
Feature: Use docker-compose example file instead of compose-file
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
||||
# Ignore docker-compose
|
||||
docker-compose.yml
|
||||
|
||||
# Virtualenv/Common
|
||||
/bin/
|
||||
/build/
|
||||
|
||||
@@ -6,8 +6,3 @@ COPY . /app
|
||||
|
||||
RUN pip install pipenv
|
||||
RUN pipenv install --three --system
|
||||
|
||||
RUN python3 manage.py collectstatic --noinput
|
||||
|
||||
VOLUME /app/static/media
|
||||
|
||||
|
||||
18
docker-compose.example.yml
Normal file
18
docker-compose.example.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
working_dir: /app
|
||||
command: >
|
||||
bash -c "python manage.py migrate
|
||||
&& python3 manage.py collectstatic --noinput
|
||||
&& gunicorn pinry.wsgi:application -b 0.0.0.0:8000 --timeout 30 --log-file - "
|
||||
ports:
|
||||
- "127.0.0.1:2048:8000"
|
||||
environment:
|
||||
- SECRET_KEY=CHANGE-ME
|
||||
user: ${CURRENT_UID}
|
||||
volumes:
|
||||
- .:/app
|
||||
restart: always
|
||||
@@ -1,19 +0,0 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres
|
||||
web:
|
||||
build: .
|
||||
command: gunicorn pinry.wsgi:application -b 0.0.0.0:80 --timeout 30 --log-file -
|
||||
ports:
|
||||
- "80:80"
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
- SECRET_KEY=CHANGE-ME
|
||||
volumes:
|
||||
- media:/app/static/media
|
||||
|
||||
volumes:
|
||||
media:
|
||||
2
start_docker_with_current_user.sh
Executable file
2
start_docker_with_current_user.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
CURRENT_UID=$(id -u):$(id -g) sudo docker-compose up ${@}
|
||||
Reference in New Issue
Block a user