forked from UniversitaDellaCalabria/uniTicket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
37 lines (36 loc) · 1.13 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
version: '2.0'
services:
#db:
#image: mariadb
#container_name: uniticket-db
#restart: always
#environment:
#MYSQL_DATABASE: uniticketdb
#MYSQL_USER: uniticket
#MYSQL_PASSWORD: changeme
#MYSQL_ROOT_PASSWORD: mypass
uniticket:
image: unical/uniticket
container_name: uniticket
restart: always
#environment:
#SQL_HOST: uniticket-db
#SQL_USER: uniticket
#SQL_PASSWORD: changeme
#SQL_DATABASE: uniticketdb
#WAIT_HOSTS: uniticket-db:3306
command: >
sh -c "/wait &&
python manage.py test --noinput &&
python manage.py migrate --noinput &&
python manage.py collectstatic --noinput &&
python manage.py shell -c \"from django.contrib.auth import get_user_model; get_user_model().objects.filter(username='admin').exists() or get_user_model().objects.create_superuser('admin', 'admin@example.com', 'adminpass')\" &&
python manage.py runserver 0.0.0.0:8000"
ports:
# HOST:CONTAINER
- "8000:8000/tcp"
- "80:8000/tcp"
#links:
#- db:uniticket-db
#depends_on:
#- db