X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=docker-compose.yml;fp=docker-compose.yml;h=b8da67a226037b9cb964e88f3a95360fb615edd9;hb=66f913355abb744c17f1b56d539bfd04b005070d;hp=0000000000000000000000000000000000000000;hpb=60b3c8d17be1ae27bc1f5b4b61f6f1be69c688bf;p=akkoma diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..b8da67a22 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,61 @@ +version: "3.7" + +services: + db: + image: akkoma-db:latest + build: ./docker-resources/database + restart: unless-stopped + user: ${DOCKER_USER} + environment: { + # This might seem insecure but is usually not a problem. + # You should leave this at the "akkoma" default. + # The DB is only reachable by containers in the same docker network, + # and is not exposed to the open internet. + # + # If you do change this, remember to update "config.exs". + POSTGRES_DB: akkoma, + POSTGRES_USER: akkoma, + POSTGRES_PASSWORD: akkoma, + } + env_file: + - .env + volumes: + - type: bind + source: ./pgdata + target: /var/lib/postgresql/data + + akkoma: + image: akkoma:latest + build: . + restart: unless-stopped + env_file: + - .env + links: + - db + ports: [ + # Uncomment/Change port mappings below as needed. + # The left side is your host machine, the right one is the akkoma container. + # You can prefix the left side with an ip. + + # Webserver (for reverse-proxies outside of docker) + # If you use a dockerized proxy, you can leave this commented + # and use a container link instead. + "127.0.0.1:4000:4000", + ] + volumes: + - .:/opt/akkoma + + # Uncomment the following if you want to use a reverse proxy + #proxy: + # image: caddy:2-alpine + # restart: unless-stopped + # links: + # - akkoma + # ports: [ + # "443:443", + # "80:80" + # ] + # volumes: + # - ./docker-resources/Caddyfile:/etc/caddy/Caddyfile + # - ./caddy-data:/data + # - ./caddy-config:/config \ No newline at end of file