Merge pull request #375 from afreydev/docker-compose-fix

This commit is contained in:
Nick Sweeting 2020-07-21 16:15:10 -04:00 committed by GitHub
commit 9b22fbb982
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 11 deletions

View file

@ -13,7 +13,10 @@ COMMAND="$@"
# e.g. ./manage.py runserver # e.g. ./manage.py runserver
chown "$USID":"$GRID" "$DATA_DIR" chown "$USID":"$GRID" "$DATA_DIR"
chown -R "$USID":"$GRID" "/home/$ARCHIVEBOX_USER"
usermod -u $USID $ARCHIVEBOX_USER if [[ "$USID" != 0 && "$GRID" != 0 ]]; then
groupmod -g $GRID $ARCHIVEBOX_USER usermod -u $USID $ARCHIVEBOX_USER
groupmod -g $GRID $ARCHIVEBOX_USER
chown -R "$USID":"$GRID" "/home/$ARCHIVEBOX_USER"
fi
gosu $ARCHIVEBOX_USER bash -c "$COMMAND" gosu $ARCHIVEBOX_USER bash -c "$COMMAND"

View file

@ -17,17 +17,19 @@ services:
command: server 0.0.0.0:8000 command: server 0.0.0.0:8000
stdin_open: true stdin_open: true
tty: true tty: true
ports:
- 8000:8000
environment: environment:
- USE_COLOR=True - USE_COLOR=True
- SHOW_PROGRESS=False - SHOW_PROGRESS=False
volumes: volumes:
- ./data:/data - ./data:/data
nginx: # nginx:
image: nginx:alpine # image: nginx:alpine
ports: # ports:
- 443:443 # - 443:443
- 80:80 # - 80:80
volumes: # volumes:
- ./etc/nginx/nginx.conf:/etc/nginx/nginx.conf # - ./etc/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./data:/var/www # - ./data:/var/www