forked from DALME/DALME-Online-Database
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor containers and begin Vue ui development
- Loading branch information
Showing
55 changed files
with
6,300 additions
and
447 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,5 @@ docs | |
db.cnf | ||
*.md | ||
pytest.ini | ||
README.md | ||
node_modules |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM node:15-buster-slim | ||
|
||
WORKDIR /opt/ui | ||
ENV PATH /opt/dalme_ui/node_modules/.bin:$PATH | ||
|
||
COPY ./dalme_ui . | ||
RUN chown -R node:node . && chmod -R 755 . | ||
USER node | ||
|
||
RUN yarn install --silent | ||
RUN yarn cache clean --force | ||
|
||
CMD ["yarn", "dev"] | ||
STOPSIGNAL SIGINT |
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,53 @@ | ||
FROM python:3.7-slim-buster | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV LANG=en_US.UTF-8 | ||
|
||
RUN adduser \ | ||
--disabled-password \ | ||
--gecos "Whisky" \ | ||
--uid 1001 \ | ||
--gid 0 \ | ||
--home /home/whisky whisky && \ | ||
chmod 1777 /home/whisky | ||
|
||
RUN rm -rf /var/lib/apt/lists/* | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
build-essential \ | ||
default-libmysqlclient-dev \ | ||
libcurl4-openssl-dev \ | ||
libssl-dev \ | ||
libxml2-dev \ | ||
libxmlsec1-dev \ | ||
libxmlsec1-openssl \ | ||
vim \ | ||
xmlsec1 | ||
RUN apt-get clean | ||
|
||
WORKDIR /opt/app | ||
COPY ./manage.py . | ||
COPY ./requirements.txt ./requirements-dev.txt . | ||
RUN pip install --no-cache-dir --upgrade pip | ||
RUN pip install --no-cache-dir -r ./requirements-dev.txt | ||
|
||
COPY dalme ./dalme | ||
COPY dalme_api ./dalme_api | ||
COPY dalme_app ./dalme_app | ||
COPY dalme_public ./dalme_public | ||
COPY dalme_purl ./dalme_purl | ||
COPY templates ./templates | ||
COPY static ./static | ||
COPY ssl-certs ./ssl-certs | ||
|
||
COPY ./config/dev/gunicorn.conf.py . | ||
COPY ./config/dev/wait-for-it.sh . | ||
RUN chmod u+x ./wait-for-it.sh | ||
|
||
RUN mkdir -p /var/log/django && \ | ||
touch /var/log/django/dalme_app.log && \ | ||
chmod 777 /var/log/django/dalme_app.log | ||
|
||
CMD ["./wait-for-it.sh", "db:3306", "--", "gunicorn", "-c", "gunicorn.conf.py", "dalme.wsgi"] | ||
STOPSIGNAL SIGINT |
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,10 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [ -v MIGRATE ]; then | ||
echo "Running migrations..." | ||
python manage.py migrate | ||
fi | ||
|
||
echo "Starting $@" | ||
exec "$@" |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
[mysql] | ||
default-character-set=utf8 | ||
|
||
[mysqld] | ||
default-authentication-plugin=mysql_native_password | ||
skip-character-set-client-handshake | ||
character-set-server=utf8 | ||
collation-server=utf8_unicode_ci | ||
[mysql] | ||
default-character-set=utf8 | ||
|
||
[mysqld] | ||
default-authentication-plugin=mysql_native_password | ||
skip-character-set-client-handshake | ||
character-set-server=utf8 | ||
collation-server=utf8_unicode_ci |
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,48 @@ | ||
upstream dalme.web { | ||
server dalme.web:8443 fail_timeout=0; | ||
} | ||
|
||
upstream dalme.ui { | ||
server dalme.ui:3000; | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
ssl_certificate /var/certs/dev-localhost.cert; | ||
ssl_certificate_key /var/certs/dev-localhost.key; | ||
server_name localhost; | ||
client_max_body_size 4G; | ||
keepalive_timeout 5; | ||
|
||
location /www/static/ { | ||
alias /static/; | ||
} | ||
|
||
location /ui { | ||
proxy_pass http://dalme.ui; | ||
proxy_set_header Host $http_host; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_redirect off; | ||
proxy_buffering off; | ||
} | ||
|
||
location /ui/hmr { | ||
proxy_pass http://dalme.ui; | ||
proxy_http_version 1.1; | ||
proxy_set_header Host $host; | ||
proxy_set_header Connection "Upgrade"; | ||
proxy_set_header Upgrade $http_upgrade; | ||
} | ||
|
||
location / { | ||
proxy_pass https://dalme.web; | ||
proxy_set_header Host $http_host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_set_header X-Forwarded-Host $http_host; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_redirect off; | ||
proxy_buffering off; | ||
} | ||
} |
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
Oops, something went wrong.