Skip to content
Snippets Groups Projects
Commit 43da353e authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Update docker-compose definitions.

parent e919c49a
No related branches found
No related tags found
No related merge requests found
FROM python:3.8-buster
65;5402;1c
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE 1
ENV PIP_DEFAULT_TIMEOUT=100
......
version: '3'
services:
db:
image: postgres:latest
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=biscuit
- POSTGRES_PASSWORD=biscuit
- POSTGRES_DB=biscuit
memcached:
image: memcached:latest
app:
build: .
volumes:
- biscuit_media:/srv/media
- biscuit_static:/srv/static
- biscuit_backups:/var/backups/biscuit
- javascript:/usr/share/javascript
environment:
- BISCUIT_secret_key=DoNotUseInProduction
- BISCUIT_http.allowed_hosts="['*']"
- BISCUIT_database.host=db
- BISCUIT_database.password=biscuit
- BISCUIT_caching.memcached.address=memcached:11211
depends_on:
- db
- memcached
web:
build: ./docker/nginx
volumes:
- biscuit_media:/srv/media
- biscuit_static:/srv/static
- javascript:/srv/javascript
ports:
- 8080:80
depends_on:
- app
volumes:
postgres_data:
biscuit_media:
biscuit_static:
biscuit_backups:
javascript:
FROM nginx
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/conf.d
RUN mkdir /srv/media
RUN mkdir /srv/static
RUN mkdir /srv/javascript
upstream biscuit {
server app:8000;
}
server {
listen 80;
location / {
proxy_pass http://biscuit;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}
location /media/ {
alias /srv/media/;
}
location /static/ {
alias /srv/static/;
}
location /javascript/ {
alias /srv/javascript/;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment