diff --git a/deploy/db_migrations/init.sql b/deploy/db_migrations/init.sql new file mode 100644 index 0000000..a125304 --- /dev/null +++ b/deploy/db_migrations/init.sql @@ -0,0 +1,3 @@ +CREATE USER egommerce; +CREATE DATABASE egommerce; +GRANT ALL PRIVILEGES ON DATABASE egommerce TO egommerce; \ No newline at end of file diff --git a/deploy/egommerce-stack.yml b/deploy/egommerce-stack.yml index 717b6ce..47fdb80 100644 --- a/deploy/egommerce-stack.yml +++ b/deploy/egommerce-stack.yml @@ -107,6 +107,7 @@ services: - POSTGRES_PASSWORD volumes: - postgres_data:/var/lib/postgresql/data + - ./db_migrations/init.sql:/docker-entrypoint-initdb.d/ networks: - postgres-db-network - api-logger-network