You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The server is struck in the middle of the first restart
To Reproduce
Made a clean install, logged in, then stopped, changed the public url and restarted
Expected behavior
Should startup regularly
Docker Compose
FIRST RUN
services:
web:
#build: ./frontend/
image: ghcr.io/seanmorley15/adventurelog-frontend:latest
container_name: adventurelog-frontend
restart: always
environment:
- PUBLIC_SERVER_URL=http://server:8000 # MOST DOCKER USERS WILL NEVER NEED TO CHANGE THIS, EVEN IF YOU CHANGE THE PORTS
- ORIGIN=http://xxxxxxx:9080
- BODY_SIZE_LIMIT=Infinity # This is measured in bytes
ports:
- "9080:3000"
depends_on:
- server
healthcheck:
test: "wget --no-verbose --tries=1 --spider http://127.0.0.1:3000 || exit 1"
interval: 1m30s
timeout: 10s
retries: 3
start_period: 10s
db:
image: postgis/postgis:15-3.3
container_name: adventurelog-db
restart: always
environment:
POSTGRES_DB: database
POSTGRES_USER: adventure
POSTGRES_PASSWORD: *****
ports:
- "9083:5432"
volumes:
- /srv/adventure/data:/var/lib/postgresql/data/
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
server:
#build: ./backend/
image: ghcr.io/seanmorley15/adventurelog-backend:latest
container_name: adventurelog-backend
restart: always
environment:
- PGHOST=db
- PGDATABASE=database
- PGUSER=adventure
- PGPASSWORD=***** # This should be the same as the POSTGRES_PASSWORD in the db service
- SECRET_KEY=*****
- DJANGO_ADMIN_USERNAME=admin
- DJANGO_ADMIN_PASSWORD=*****
- DJANGO_ADMIN_EMAIL=**************
- PUBLIC_URL='http://<server-ip>:9082' # NOTE: THIS IS THE PUBLIC URL TO THE **NGINX** SERVER USED FOR MEDIA FILES!
- CSRF_TRUSTED_ORIGINS=http://<server-ip> # This is a comma separated list of trusted origins for CSRF, this should include where your frontend is hosted.
- DEBUG=True
- FRONTEND_URL='http://xxxxxxx:9080' # This is the URL of the frontend server
- DISABLE_REGISTRATION=False
ports:
- "9081:8000"
depends_on:
- db
volumes:
- /srv/adventure/media:/code/media/
healthcheck:
test: "bash -c 'echo -n > /dev/tcp/127.0.0.1/8000'"
interval: 1m30s
timeout: 5s
retries: 3
start_period: 5m
nginx:
image: nginx:latest
container_name: adventurelog-nginx
restart: always
ports:
- "9082:80"
volumes:
- /srv/adventure/media:/app/media
- /srv/adventure/proxy/nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- server
healthcheck:
test: "curl -k --fail http://127.0.0.1:80/media/images/test.webp || exit 1"
interval: 1m30s
timeout: 10s
retries: 3
start_period: 5s
SECOND RUN
services:
web:
#build: ./frontend/
image: ghcr.io/seanmorley15/adventurelog-frontend:latest
container_name: adventurelog-frontend
restart: always
environment:
- PUBLIC_SERVER_URL=http://server:8000 # MOST DOCKER USERS WILL NEVER NEED TO CHANGE THIS, EVEN IF YOU CHANGE THE PORTS
- ORIGIN=https://yyyyyyyyy.local
- BODY_SIZE_LIMIT=Infinity # This is measured in bytes
ports:
- "9080:3000"
depends_on:
- server
healthcheck:
test: "wget --no-verbose --tries=1 --spider http://127.0.0.1:3000 || exit 1"
interval: 1m30s
timeout: 10s
retries: 3
start_period: 10s
db:
image: postgis/postgis:15-3.3
container_name: adventurelog-db
restart: always
environment:
POSTGRES_DB: database
POSTGRES_USER: adventure
POSTGRES_PASSWORD: *****
ports:
- "9083:5432"
volumes:
- /srv/adventure/data:/var/lib/postgresql/data/
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
server:
#build: ./backend/
image: ghcr.io/seanmorley15/adventurelog-backend:latest
container_name: adventurelog-backend
restart: always
environment:
- PGHOST=db
- PGDATABASE=database
- PGUSER=adventure
- PGPASSWORD=***** # This should be the same as the POSTGRES_PASSWORD in the db service
- SECRET_KEY=*****
- DJANGO_ADMIN_USERNAME=admin
- DJANGO_ADMIN_PASSWORD=*****
- DJANGO_ADMIN_EMAIL=**************
- PUBLIC_URL='http://<server-ip>:9082' # NOTE: THIS IS THE PUBLIC URL TO THE **NGINX** SERVER USED FOR MEDIA FILES!
- CSRF_TRUSTED_ORIGINS=http://<server-ip> # This is a comma separated list of trusted origins for CSRF, this should include where your frontend is hosted.
- DEBUG=True
- FRONTEND_URL='https://yyyyyyyyy.local' # This is the URL of the frontend server
- DISABLE_REGISTRATION=False
ports:
- "9081:8000"
depends_on:
- db
volumes:
- /srv/adventure/media:/code/media/
healthcheck:
test: "bash -c 'echo -n > /dev/tcp/127.0.0.1/8000'"
interval: 1m30s
timeout: 5s
retries: 3
start_period: 5m
nginx:
image: nginx:latest
container_name: adventurelog-nginx
restart: always
ports:
- "9082:80"
volumes:
- /srv/adventure/media:/app/media
- /srv/adventure/proxy/nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- server
healthcheck:
test: "curl -k --fail http://127.0.0.1:80/media/images/test.webp || exit 1"
interval: 1m30s
timeout: 10s
retries: 3
start_period: 5s
Additional context
Logs:
FIRST RUN (time: 5 m,inutes)
[...]
Country Zimbabwe prepared
State ZW-BU prepared
State ZW-HA prepared
State ZW-MA prepared
State ZW-MC prepared
State ZW-ME prepared
State ZW-MW prepared
State ZW-MV prepared
State ZW-MN prepared
State ZW-MS prepared
State ZW-MI prepared
All data imported successfully
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
October 25, 2024 - 13:57:24
Django version 5.0.8, using settings 'main.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
SECOND RUN (time: infinite)
[...]
Country Zimbabwe prepared
State ZW-BU prepared
State ZW-HA prepared
State ZW-MA prepared
State ZW-MC prepared
State ZW-ME prepared
State ZW-MW prepared
State ZW-MV prepared
State ZW-MN prepared
State ZW-MS prepared
State ZW-MI prepared
The text was updated successfully, but these errors were encountered:
Describe the bug
The server is struck in the middle of the first restart
To Reproduce
Made a clean install, logged in, then stopped, changed the public url and restarted
Expected behavior
Should startup regularly
Docker Compose
FIRST RUN
SECOND RUN
Additional context
Logs:
FIRST RUN (time: 5 m,inutes)
SECOND RUN (time: infinite)
The text was updated successfully, but these errors were encountered: