Move Docker stuff to its own directory
parent
fd4b11fe38
commit
00530ed324
12
Dockerfile
12
Dockerfile
|
@ -1,12 +0,0 @@
|
||||||
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"]
|
|
|
@ -1,21 +0,0 @@
|
||||||
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"
|
|
10
nginx.conf
10
nginx.conf
|
@ -1,10 +0,0 @@
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
listen [::]:80;
|
|
||||||
server_name _;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
include uwsgi_params;
|
|
||||||
uwsgi_pass wiki:3031;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue