Move Docker stuff to its own directory
parent
00530ed324
commit
d65e9a415b
|
@ -0,0 +1,12 @@
|
|||
FROM python:3
|
||||
|
||||
RUN useradd --system --gid root --uid 1001 uwsgi
|
||||
RUN pip install uwsgi psycopg2_binary Flask Flask-Admin Flask-SQLAlchemy Flask-Bcrypt \
|
||||
Flask-Security-Too bcrypt email_validator pyyaml rst2html
|
||||
RUN mkdir -p /app
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
|
||||
EXPOSE 3031
|
||||
CMD ["uwsgi", "--master", "--workers", "4", "--socket", "0.0.0.0:3031", "--protocol", "uwsgi", \
|
||||
"--plugin", "python3", "--uid", "uwsgi", "--wsgi", "libertywiki.wsgi"]
|
|
@ -0,0 +1,21 @@
|
|||
version: '3'
|
||||
services:
|
||||
wiki:
|
||||
build:
|
||||
context: .
|
||||
environment:
|
||||
- SQLALCHEMY_DATABASE_URI=postgresql://wiki:wiki@postgres/wiki
|
||||
- SECRET_KEY=super-secret-key-replace-me
|
||||
- SECURITY_PASSWORD_SALT=password-salt-replace-me
|
||||
postgres:
|
||||
image: postgres:14
|
||||
environment:
|
||||
- POSTGRES_USER=wiki
|
||||
- POSTGRES_PASSWORD=wiki
|
||||
- POSTGRES_DB=wiki
|
||||
nginx:
|
||||
image: nginx
|
||||
volumes:
|
||||
- "./nginx.conf:/etc/nginx/conf.d/default.conf:ro"
|
||||
ports:
|
||||
- "8000:80"
|
|
@ -0,0 +1,10 @@
|
|||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name _;
|
||||
|
||||
location / {
|
||||
include uwsgi_params;
|
||||
uwsgi_pass wiki:3031;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue