Skip to content

Latest commit

 

History

History
69 lines (52 loc) · 1.39 KB

README.md

File metadata and controls

69 lines (52 loc) · 1.39 KB

What is Up1-docker

Dockerfile for Up1, a client-side encrypted anonymous file photo hosting service

How to use Up1-docker

1. Clone repo:

$ cd /opt/
$ git clone https://github.com/alexdatur/Up1-docker.git
$ cd /opt/Up1-docker/

2. Edit the Dockerfile:

$ nano Dockerfile
EXPOSE 9000:9000

ENV HTTP="true" \
	HTTP_LISTEN="0.0.0.0:9000" \
	HTTPS="false" \
        API_KEY="something_really_random" \
	DELETE_KEY="another_random_string" \
	MAX_FILE_SIZE=100000000 \
	SERVER="" \
	FOOTER=""

RUN apt-get install -y git && \
	cd /srv && \
	git clone https://github.com/Upload/Up1 && \
	cd Up1/server && npm install && \
	apt-get remove -y git

WORKDIR /srv/Up1/server

COPY server.conf.template server.conf.template
COPY config.js.template ../client/config.js.template
COPY genconfig.sh genconfig.sh
COPY entrypoint.sh entrypoint.sh

RUN chmod +x genconfig.sh entrypoint.sh

ENTRYPOINT /srv/Up1/server/entrypoint.sh

edit this lines:

API_KEY="something_really_random" \
DELETE_KEY="another_random_string" \
MAX_FILE_SIZE=100000000 \

3. Save changes

4. Rebuild the container:

$ docker build -t up1 .

5. Start container:

$ docker run --name up1 -p 9000:9000 -v /path/to/local/storage/:/srv/Up1/i/ up1

HTTPS is not supported cause it intended to use reverse proxy in front container for HTTPS.