Compare commits

...

4 Commits
main ... docker

4 changed files with 37 additions and 3 deletions

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM python:3
VOLUME /tmp/app
WORKDIR /tmp/app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN ./manage.py migrate
EXPOSE 8000
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]

View File

@ -2,7 +2,6 @@
Organise your conferences.
## HowTo Test
(you should work on a virtualenv)
@ -16,7 +15,6 @@ pip install -U -r requirements.txt
./manage.py createsuperuser
```
## HowTo update translations
```bash
@ -24,3 +22,17 @@ pip install -U -r requirements.txt
poedit locale/fr/LC_MESSAGES/django.po
./manage.py compilemessages
```
## Docker
### Build
docker build -t ponyconf .
### Start
./test_site.bash
### Configure
docker exec -it ponyconf ./manage.py createsuperuser

View File

@ -15,7 +15,7 @@ SECRET_KEY = 'm2d03t^m)!nsborq5a1#e!#m)wjl&-%tu4ew@fxf1_b_t*@36r'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
ALLOWED_HOSTS = ["0.0.0.0"]
# Application definition

8
test_site.bash Executable file
View File

@ -0,0 +1,8 @@
docker run \
--rm \
-it \
-v `pwd`:/tmp/app \
-w /tmp/app \
-p 8000:8000 \
--name ponyconf \
ponyconf