Skip to content

Commit a0ef570

Browse files
committed
Add docker-compose.local.yaml
1 parent 52f55c2 commit a0ef570

File tree

5 files changed

+52
-0
lines changed

5 files changed

+52
-0
lines changed

docker-compose.local.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
version: '3.2'
2+
3+
services:
4+
5+
postgresql:
6+
build: docker/postgres/.
7+
env_file:
8+
- env/local.pg.env
9+
ports:
10+
- '5454:5432'
11+
networks:
12+
- iposter_local_network
13+
volumes:
14+
- pg_data:/var/lib/postgresql/data
15+
16+
minio:
17+
image: minio/minio
18+
entrypoint: sh
19+
command: -c 'mkdir -p /export/media && /usr/bin/minio server /export'
20+
env_file:
21+
- env/local.minio.env
22+
ports:
23+
- '9000:9000'
24+
networks:
25+
- iposter_local_network
26+
volumes:
27+
- minio_data:/var/lib/minio/data
28+
29+
volumes:
30+
pg_data:
31+
minio_data:
32+
33+
networks:
34+
iposter_local_network:
35+
driver: bridge

docker/postgres/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM postgres:11.2-alpine
2+
ENV PG_MAX_WAL_SENDERS 8
3+
ENV PG_WAL_KEEP_SEGMENTS 8
4+
5+
COPY docker-entrypoint.sh /docker-entrypoint-initdb.d/docker-entrypoint.sh

docker/postgres/docker-entrypoint.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
6+
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
7+
EOSQL

env/local.minio.env

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
MINIO_ACCESS_KEY=aid6jaeng6IeWahv6hae
2+
MINIO_SECRET_KEY=ri5aX5Meishi9haihooB

env/local.pg.env

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
POSTGRES_USER=iposter
2+
POSTGRES_PASSWORD=souQu6ienug0ash9eeY9
3+
POSTGRES_DB=iposter

0 commit comments

Comments
 (0)