This repository was archived by the owner on Oct 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (47 loc) · 1.31 KB
/
Copy pathMakefile
File metadata and controls
52 lines (47 loc) · 1.31 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
NAME = seafile
all: build run tests clean
build:
docker build -t $(NAME) .
docker build --build-arg SEAFILE_VERSION=6.1.2 \
--build-arg SEAFILE_MAJOR=6.1 -t $(NAME):old .
run:
docker run -d --name seafile_http \
-p "80:80" \
-e SEAFILE_EXTERNAL_PORT=80 \
-e SEAFILE_HOSTNAME=localhost \
-e SEAFILE_SERVER_NAME=myseafile \
-e SEAFILE_ADMIN_MAIL=admin@seafile.com \
-e SEAFILE_ADMIN_PASSWORD=test123 \
-v "/tmp/seafile_http:/data" \
$(NAME)
sleep 20
docker run -d --name seafile_old_http \
-p "81:80" \
-e SEAFILE_EXTERNAL_PORT=81 \
-e SEAFILE_HOSTNAME=localhost \
-e SEAFILE_SERVER_NAME=myseafile \
-e SEAFILE_ADMIN_MAIL=admin@seafile.com \
-e SEAFILE_ADMIN_PASSWORD=test123 \
-v "/tmp/seafile_old_http:/data" \
$(NAME):old
sleep 20
docker run -d --name seafile_https \
-p "443:443" \
-e SEAFILE_EXTERNAL_PORT=443 \
-e SEAFILE_HOSTNAME=localhost \
-e SEAFILE_SERVER_NAME=myseafile \
-e SEAFILE_ADMIN_MAIL=admin@seafile.com \
-e SEAFILE_ADMIN_PASSWORD=test123 \
-e USE_SSL=on \
-v "/tmp/seafile_https:/data" \
-v "`pwd`/test/ssl:/etc/ssl" \
$(NAME)
sleep 20
tests:
./test/bats/bats ./test/tests.bats
clean:
docker rm -f seafile_http \
seafile_old_http \
seafile_https
sudo rm -rf /tmp/seafile_http /tmp/seafile_old_http /tmp/seafile_https
docker rmi $(NAME) $(NAME):old