-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2195 from scpwiki/WJ-1286-install-dir
[WJ-1286] Reorganize install/ directory
- Loading branch information
Showing
58 changed files
with
171 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../common/api/health-check.sh |
2 changes: 1 addition & 1 deletion
2
install/dev/digitalocean/redis/Dockerfile → install/dev/redis/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
FROM redis:alpine | ||
|
||
EXPOSE 6379 | ||
COPY ./install/dev/digitalocean/redis/redis.conf /usr/local/etc/redis.conf | ||
COPY ./install/dev/redis/redis.conf /usr/local/etc/redis.conf | ||
CMD ["redis-server", "/usr/local/etc/redis.conf"] |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../common/api/health-check.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import argparse | ||
import os | ||
|
||
|
||
def chdir_wikijump(): | ||
# Determine where this script is | ||
full_path = __file__ | ||
if not os.path.abspath(full_path): | ||
full_path = os.path.join(os.getcwd(), full_path) | ||
|
||
# The directory it's located in should be install/local/ | ||
# So we should change to that | ||
install_local_dir = os.path.dirname(full_path) | ||
os.chdir(install_local_dir) | ||
|
||
|
||
if __name__ == "__main__": | ||
# Parse arguments | ||
argparser = argparse.ArgumentParser() | ||
argparser.add_argument( | ||
"-S", | ||
"--sudo", | ||
action="store_true", | ||
help="Runs the docker-compose command using sudo", | ||
) | ||
argparser.add_argument( | ||
"-d", | ||
"--no-dev", | ||
action="store_true", | ||
help="Do not use the docker-compose.dev.yaml convenience bindings", | ||
) | ||
argparser.add_argument( | ||
"-x", | ||
"--no-chdir", | ||
action="store_true", | ||
help="Do not change directory before attempting to run docker-compose", | ||
) | ||
argparser.add_argument("action", nargs=argparse.REMAINDER) | ||
args = argparser.parse_args() | ||
|
||
# Get into the right context | ||
if not args.no_chdir: | ||
chdir_wikijump() | ||
|
||
# Build command-line argument list | ||
cmdline = [ | ||
"docker-compose", | ||
"-p", | ||
"wikijump", | ||
"-f", | ||
"docker-compose.yaml", | ||
] | ||
|
||
if args.sudo: | ||
cmdline.insert(0, "sudo") | ||
|
||
if not args.no_dev: | ||
cmdline.extend(("-f", "docker-compose.dev.yaml")) | ||
|
||
cmdline.extend(args.action) | ||
|
||
# We use exec instead of subprocess since this is just a launch script, | ||
# it doesn't need to do any work after starting docker-compose. | ||
print(" ".join(cmdline)) | ||
os.execvp(cmdline[0], cmdline) |
Oops, something went wrong.