git clone https://github.com/Ra1ze505/DockerSetUp.git
DEBUG=1
SECRET_KEY=change_me
DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
SQL_ENGINE=django.db.backends.postgresql
SQL_DATABASE=hello_django_prod
SQL_USER=hello_django
SQL_PASSWORD=hello_django
SQL_HOST=db
SQL_PORT=5432
DATABASE=postgres
POSTGRES_USER=hello_django
POSTGRES_PASSWORD=hello_django
POSTGRES_DB=hello_django_prod
docker-compose up
docker-compose exec --user django <container-name> sh
source /src/venv/bin/activate
DEBUG=0
SECRET_KEY=change_me
DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 your.domain.com [::1]
SQL_ENGINE=django.db.backends.postgresql
SQL_DATABASE=hello_django_prod
SQL_USER=hello_django
SQL_PASSWORD=hello_django
SQL_HOST=db
SQL_PORT=5432
DATABASE=postgres
POSTGRES_USER=hello_django
POSTGRES_PASSWORD=hello_django
POSTGRES_DB=hello_django_prod
###Up containers:
sudo docker-compose -f docker-compose.prod.yml up --build -d
You can see traefik dashboard on https://dashboard-traefik.localhost/
# username: testuser
# password: password
$ echo $(htpasswd -nb testuser password) | sed -e s/\\$/\\$\\$/g
testuser:$$apr1$$jIKW.bdS$$eKXe4Lxjgy/rH65wP1iQe1
traefik:
...
labels:
...
- "traefik.http.middlewares.auth.basicauth.users=testuser:$$apr1$$jIKW.bdS$$eKXe4Lxjgy/rH65wP1iQe1"
standard_init_linux.go:228: exec user process caused: no such file or directory
------
> [build 8/8] RUN chmod +x ./find_deps.sh && ./find_deps.sh ./venv/ > deps.txt:
#20 0.446 /bin/sh: ./find_deps.sh: not found
------
executor failed running [/bin/sh -c chmod +x ./find_deps.sh && ./find_deps.sh ./venv/ > deps.txt]: exit code: 127
ERROR: Service 'web' failed to build : Build failed
ERROR: for web Cannot start service web: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/home/app/web/entrypoint.prod.sh": permission denied: unknown
chmod +x entrypoint.prod.sh